Module org.apache.lucene.core
Class Lucene90CompressingTermVectorsReader
java.lang.Object
org.apache.lucene.index.TermVectors
org.apache.lucene.codecs.TermVectorsReader
org.apache.lucene.codecs.lucene90.compressing.Lucene90CompressingTermVectorsReader
- All Implemented Interfaces:
Closeable,AutoCloseable,Cloneable
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static classprivate classprivate static classprivate static classprivate static class -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final intprivate booleanprivate final CompressionModeprivate final Decompressorprivate final FieldInfos(package private) final FieldsIndexprivate final longprivate final longprivate final longprivate final longprivate final intprivate final intprivate final BlockPackedReaderIterator(package private) final IndexInputprivate final intFields inherited from class org.apache.lucene.index.TermVectors
EMPTY -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateLucene90CompressingTermVectorsReader(Directory d, SegmentInfo si, String segmentSuffix, FieldInfos fn, IOContext context, String formatName, CompressionMode compressionMode) Sole constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoidChecks consistency of this reader.clone()Create a clone that one caller at a time may use to read term vectors.voidclose()private voidget(int doc) Returns term vectors for this document, or null if term vectors were not indexed.(package private) int(package private) CompressionMode(package private) FieldsIndex(package private) longReturns an instance optimized for merging.(package private) long(package private) long(package private) long(package private) int(package private) int(package private) IndexInput(package private) int(package private) booleanisLoaded(int docID) Checks if a given docID was loaded in the current block state.private int[][]positionIndex(int skip, int numFields, LongValues numTerms, int[] termFreqs) private int[][]readPositions(int skip, int numFields, LongValues flags, LongValues numTerms, int[] termFreqs, int flag, int totalPositions, int[][] positionIndex) private static RandomAccessInputslice(IndexInput in) private static intsum(int[] arr) toString()Methods inherited from class org.apache.lucene.index.TermVectors
get
-
Field Details
-
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
-
numChunks
private final long numChunks -
numDirtyChunks
private final long numDirtyChunks -
numDirtyDocs
private final long numDirtyDocs -
maxPointer
private final long maxPointer -
blockState
-
-
Constructor Details
-
Lucene90CompressingTermVectorsReader
-
Lucene90CompressingTermVectorsReader
public Lucene90CompressingTermVectorsReader(Directory d, SegmentInfo si, String segmentSuffix, FieldInfos fn, IOContext context, String formatName, CompressionMode compressionMode) throws IOException Sole constructor.- Throws:
IOException
-
-
Method Details
-
getCompressionMode
CompressionMode getCompressionMode() -
getChunkSize
int getChunkSize() -
getPackedIntsVersion
int getPackedIntsVersion() -
getVersion
int getVersion() -
getIndexReader
FieldsIndex getIndexReader() -
getVectorsStream
IndexInput getVectorsStream() -
getMaxPointer
long getMaxPointer() -
getNumDirtyDocs
long getNumDirtyDocs() -
getNumDirtyChunks
long getNumDirtyChunks() -
getNumChunks
long getNumChunks() -
getNumDocs
int getNumDocs() -
ensureOpen
- Throws:
AlreadyClosedException- if this TermVectorsReader is closed
-
close
- Throws:
IOException
-
clone
Description copied from class:TermVectorsReaderCreate a clone that one caller at a time may use to read term vectors.- Specified by:
clonein classTermVectorsReader
-
getMergeInstance
Description copied from class:TermVectorsReaderReturns an instance optimized for merging. This instance may only be consumed in the thread that calledTermVectorsReader.getMergeInstance().The default implementation returns
this- Overrides:
getMergeInstancein classTermVectorsReader
-
slice
- Throws:
IOException
-
isLoaded
boolean isLoaded(int docID) Checks if a given docID was loaded in the current block state. -
get
Description copied from class:TermVectorsReturns 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
OffsetAttributeavailable from thePostingsEnum.- Specified by:
getin classTermVectors- Throws:
IOException
-
positionIndex
-
readPositions
private int[][] readPositions(int skip, int numFields, LongValues flags, LongValues 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:TermVectorsReaderChecks 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:
checkIntegrityin classTermVectorsReader- Throws:
IOException
-
toString
-