Package org.apache.lucene.codecs
Class TermVectorsReader
- java.lang.Object
-
- org.apache.lucene.codecs.TermVectorsReader
-
- All Implemented Interfaces:
Closeable,AutoCloseable,Cloneable
- Direct Known Subclasses:
Lucene90CompressingTermVectorsReader
public abstract class TermVectorsReader extends Object implements Cloneable, Closeable
Codec API for reading term vectors:- WARNING: This API is experimental and might change in incompatible ways in the next release.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedTermVectorsReader()Sole constructor.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract voidcheckIntegrity()Checks consistency of this reader.abstract TermVectorsReaderclone()Create a clone that one caller at a time may use to read term vectors.abstract Fieldsget(int doc)Returns term vectors for this document, or null if term vectors were not indexed.TermVectorsReadergetMergeInstance()Returns an instance optimized for merging.
-
-
-
Method Detail
-
get
public abstract Fields get(int doc) throws IOException
Returns term vectors for this document, or null if term vectors were not indexed. If offsets are available they are in anOffsetAttributeavailable from thePostingsEnum.- Throws:
IOException
-
checkIntegrity
public abstract void checkIntegrity() throws IOExceptionChecks 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.
- Throws:
IOException- NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.
-
clone
public abstract TermVectorsReader clone()
Create a clone that one caller at a time may use to read term vectors.
-
getMergeInstance
public TermVectorsReader getMergeInstance()
Returns an instance optimized for merging. This instance may only be consumed in the thread that calledgetMergeInstance().The default implementation returns
this
-
-