Package org.apache.lucene.index
Class TermVectors
java.lang.Object
org.apache.lucene.index.TermVectors
- Direct Known Subclasses:
TermVectorsReader
API for reading term vectors.
NOTE: This class is not thread-safe and should only be consumed in the thread where it was acquired.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final TermVectors
Instance that never returns term vectors -
Constructor Summary
-
Method Summary
-
Field Details
-
EMPTY
Instance that never returns term vectors
-
-
Constructor Details
-
TermVectors
protected TermVectors()Sole constructor. (For invocation by subclass constructors, typically implicit.)
-
-
Method Details
-
get
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
.- Throws:
IOException
-
get
Retrieve term vector for this document and field, or null if term vectors were not indexed.The returned Terms 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
.- Throws:
IOException
-