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
- WARNING: This API is experimental and might change in incompatible ways in the next release.
-
Field Summary
Fields inherited from class org.apache.lucene.index.TermVectors
EMPTY -
Constructor Summary
ConstructorsConstructorDescriptionLucene90CompressingTermVectorsReader(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()get(int doc) Returns term vectors for this document, or null if term vectors were not indexed.Returns an instance optimized for merging.voidprefetch(int docID) Optional method: Give a hint to thisTermVectorsinstance that the given document will be read in the near future.toString()Methods inherited from class org.apache.lucene.index.TermVectors
get
-
Constructor Details
-
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
-
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
-
prefetch
Description copied from class:TermVectorsOptional method: Give a hint to thisTermVectorsinstance that the given document will be read in the near future. This typically delegates toIndexInput.prefetch(long, long)and is useful to parallelize I/O across multiple documents.NOTE: This API is expected to be called on a small enough set of doc IDs that they could all fit in the page cache. If you plan on retrieving a very large number of documents, it may be a good idea to perform calls to
TermVectors.prefetch(int)andTermVectors.get(int)in batches instead of prefetching all documents up-front.- Overrides:
prefetchin classTermVectors- Throws:
IOException
-
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
-
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
-