Class Lucene50CompressingTermVectorsReader
java.lang.Object
org.apache.lucene.index.TermVectors
org.apache.lucene.codecs.TermVectorsReader
org.apache.lucene.backward_codecs.lucene50.compressing.Lucene50CompressingTermVectorsReader
- All Implemented Interfaces:
Closeable
,AutoCloseable
,Cloneable
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate class
private static class
private static class
private static class
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final int
private boolean
private final CompressionMode
private final Decompressor
private final FieldInfos
(package private) static final int
(package private) final FieldsIndex
private final long
(package private) static final int
private final int
(package private) static final int
(package private) static final int
private final int
(package private) static final int
(package private) static final int
private final BlockPackedReaderIterator
(package private) static final String
(package private) static final String
(package private) static final String
(package private) static final String
(package private) final IndexInput
private final int
(package private) static final int
(package private) static final int
Version where all metadata were moved to the meta file.(package private) static final int
Version where numChunks is explicitly recorded in meta file(package private) static final int
(package private) static final int
Fields inherited from class org.apache.lucene.index.TermVectors
EMPTY
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
Lucene50CompressingTermVectorsReader
(Directory d, SegmentInfo si, String segmentSuffix, FieldInfos fn, IOContext context, String formatName, CompressionMode compressionMode) Sole constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Checks consistency of this reader.clone()
Create a clone that one caller at a time may use to read term vectors.void
close()
private void
get
(int doc) Returns term vectors for this document, or null if term vectors were not indexed.private int[][]
positionIndex
(int skip, int numFields, PackedInts.Reader numTerms, int[] termFreqs) private int[][]
readPositions
(int skip, int numFields, PackedInts.Reader flags, PackedInts.Reader numTerms, int[] termFreqs, int flag, int totalPositions, int[][] positionIndex) private static int
sum
(int[] arr) toString()
Methods inherited from class org.apache.lucene.codecs.TermVectorsReader
getMergeInstance
Methods inherited from class org.apache.lucene.index.TermVectors
get
-
Field Details
-
VECTORS_EXTENSION
- See Also:
-
VECTORS_INDEX_EXTENSION
- See Also:
-
VECTORS_META_EXTENSION
- See Also:
-
VECTORS_INDEX_CODEC_NAME
- See Also:
-
VERSION_START
static final int VERSION_START- See Also:
-
VERSION_OFFHEAP_INDEX
static final int VERSION_OFFHEAP_INDEX- See Also:
-
VERSION_META
static final int VERSION_METAVersion where all metadata were moved to the meta file.- See Also:
-
VERSION_NUM_CHUNKS
static final int VERSION_NUM_CHUNKSVersion where numChunks is explicitly recorded in meta file- See Also:
-
VERSION_CURRENT
static final int VERSION_CURRENT- See Also:
-
META_VERSION_START
static final int META_VERSION_START- See Also:
-
PACKED_BLOCK_SIZE
static final int PACKED_BLOCK_SIZE- See Also:
-
POSITIONS
static final int POSITIONS- See Also:
-
OFFSETS
static final int OFFSETS- See Also:
-
PAYLOADS
static final int PAYLOADS- See Also:
-
FLAGS_BITS
static final int FLAGS_BITS -
fieldInfos
-
indexReader
-
vectorsStream
-
version
private final int version -
packedIntsVersion
private final int packedIntsVersion -
compressionMode
-
decompressor
-
chunkSize
private final int chunkSize -
numDocs
private final int numDocs -
closed
private boolean closed -
reader
-
maxPointer
private final long maxPointer
-
-
Constructor Details
-
Lucene50CompressingTermVectorsReader
-
Lucene50CompressingTermVectorsReader
public Lucene50CompressingTermVectorsReader(Directory d, SegmentInfo si, String segmentSuffix, FieldInfos fn, IOContext context, String formatName, CompressionMode compressionMode) throws IOException Sole constructor.- Throws:
IOException
-
-
Method Details
-
ensureOpen
- Throws:
AlreadyClosedException
- if this TermVectorsReader is closed
-
close
- Throws:
IOException
-
clone
Description copied from class:TermVectorsReader
Create a clone that one caller at a time may use to read term vectors.- Specified by:
clone
in classTermVectorsReader
-
get
Description copied from class:TermVectors
Returns term vectors for this document, or null if term vectors were not indexed.The returned Fields instance acts like a single-document inverted index (the docID will be 0). If offsets are available they are in an
OffsetAttribute
available from thePostingsEnum
.- Specified by:
get
in classTermVectors
- Throws:
IOException
-
positionIndex
-
readPositions
private int[][] readPositions(int skip, int numFields, PackedInts.Reader flags, PackedInts.Reader numTerms, int[] termFreqs, int flag, int totalPositions, int[][] positionIndex) throws IOException - Throws:
IOException
-
sum
private static int sum(int[] arr) -
checkIntegrity
Description copied from class:TermVectorsReader
Checks consistency of this reader.Note that this may be costly in terms of I/O, e.g. may involve computing a checksum value against large data files.
- Specified by:
checkIntegrity
in classTermVectorsReader
- Throws:
IOException
-
toString
-