Class SimpleTextTermVectorsReader
java.lang.Object
org.apache.lucene.codecs.TermVectorsReader
org.apache.lucene.codecs.simpletext.SimpleTextTermVectorsReader
- All Implemented Interfaces:
Closeable,AutoCloseable,Cloneable
Reads plain-text term vectors.
FOR RECREATIONAL USE ONLY
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static classprivate static classprivate static classprivate static classprivate static classprivate static class -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate IndexInputprivate long[]private BytesRefBuilderprivate CharsRefBuilder -
Constructor Summary
ConstructorsConstructorDescriptionSimpleTextTermVectorsReader(long[] offsets, IndexInput in) SimpleTextTermVectorsReader(Directory directory, SegmentInfo si, IOContext context) -
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.private intparseIntAt(int offset) private voidreadIndex(int maxDoc) private voidreadLine()private StringreadString(int offset, BytesRefBuilder scratch) toString()Methods inherited from class org.apache.lucene.codecs.TermVectorsReader
getMergeInstance
-
Field Details
-
offsets
private long[] offsets -
in
-
scratch
-
scratchUTF16
-
-
Constructor Details
-
SimpleTextTermVectorsReader
public SimpleTextTermVectorsReader(Directory directory, SegmentInfo si, IOContext context) throws IOException - Throws:
IOException
-
SimpleTextTermVectorsReader
SimpleTextTermVectorsReader(long[] offsets, IndexInput in)
-
-
Method Details
-
readIndex
- Throws:
IOException
-
get
Description copied from class:TermVectorsReaderReturns term vectors for this document, or null if term vectors were not indexed. If offsets are available they are in anOffsetAttributeavailable from thePostingsEnum.- Specified by:
getin classTermVectorsReader- 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
-
close
- Throws:
IOException
-
readLine
- Throws:
IOException
-
parseIntAt
private int parseIntAt(int offset) -
readString
-
toString
-
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
-