Package org.apache.lucene.codecs
Class TermVectorsReader
java.lang.Object
org.apache.lucene.codecs.TermVectorsReader
- All Implemented Interfaces:
Closeable,AutoCloseable,Cloneable,Accountable
- Direct Known Subclasses:
CompressingTermVectorsReader,SimpleTextTermVectorsReader
Codec API for reading term vectors:
-
Field Summary
Fields inherited from interface org.apache.lucene.util.Accountable
NULL_ACCOUNTABLE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract voidChecks 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.Returns an instance optimized for merging.Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.lucene.util.Accountable
getChildResources, ramBytesUsed
-
Constructor Details
-
TermVectorsReader
protected TermVectorsReader()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. If offsets are available they are in anOffsetAttributeavailable from thePostingsEnum.- Throws:
IOException
-
checkIntegrity
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.
- Throws:
IOException
-
clone
Create a clone that one caller at a time may use to read term vectors. -
getMergeInstance
Returns an instance optimized for merging. This instance may only be consumed in the thread that calledgetMergeInstance().The default implementation returns
this
-