Package org.apache.lucene.codecs
Class TermVectorsReader
- java.lang.Object
-
- org.apache.lucene.codecs.TermVectorsReader
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
,java.lang.Cloneable
- Direct Known Subclasses:
Lucene50CompressingTermVectorsReader
,Lucene90CompressingTermVectorsReader
,SimpleTextTermVectorsReader
public abstract class TermVectorsReader extends java.lang.Object implements java.lang.Cloneable, java.io.Closeable
Codec API for reading term vectors:
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
TermVectorsReader()
Sole constructor.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract void
checkIntegrity()
Checks consistency of this reader.abstract TermVectorsReader
clone()
Create a clone that one caller at a time may use to read term vectors.abstract Fields
get(int doc)
Returns term vectors for this document, or null if term vectors were not indexed.TermVectorsReader
getMergeInstance()
Returns an instance optimized for merging.
-
-
-
Method Detail
-
get
public abstract Fields get(int doc) throws java.io.IOException
Returns term vectors for this document, or null if term vectors were not indexed. If offsets are available they are in anOffsetAttribute
available from thePostingsEnum
.- Throws:
java.io.IOException
-
checkIntegrity
public abstract void checkIntegrity() throws java.io.IOException
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:
java.io.IOException
-
clone
public abstract TermVectorsReader clone()
Create a clone that one caller at a time may use to read term vectors.- Overrides:
clone
in classjava.lang.Object
-
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
-
-