public class SimpleTextTermVectorsReader extends TermVectorsReader
FOR RECREATIONAL USE ONLY
| Modifier and Type | Class and Description |
|---|---|
private static class |
SimpleTextTermVectorsReader.SimpleTVDocsEnum |
private static class |
SimpleTextTermVectorsReader.SimpleTVFields |
private static class |
SimpleTextTermVectorsReader.SimpleTVPostings |
private static class |
SimpleTextTermVectorsReader.SimpleTVPostingsEnum |
private static class |
SimpleTextTermVectorsReader.SimpleTVTerms |
private static class |
SimpleTextTermVectorsReader.SimpleTVTermsEnum |
| Modifier and Type | Field and Description |
|---|---|
private static long |
BASE_RAM_BYTES_USED |
private IndexInput |
in |
private long[] |
offsets |
private BytesRefBuilder |
scratch |
private CharsRefBuilder |
scratchUTF16 |
| Constructor and Description |
|---|
SimpleTextTermVectorsReader(Directory directory,
SegmentInfo si,
IOContext context) |
SimpleTextTermVectorsReader(long[] offsets,
IndexInput in) |
| Modifier and Type | Method and Description |
|---|---|
void |
checkIntegrity()
Checks consistency of this reader.
|
TermVectorsReader |
clone()
Create a clone that one caller at a time may use to
read term vectors.
|
void |
close() |
Fields |
get(int doc)
Returns term vectors for this document, or null if
term vectors were not indexed.
|
private int |
parseIntAt(int offset) |
long |
ramBytesUsed()
Return the memory usage of this object in bytes.
|
private void |
readIndex(int maxDoc) |
private void |
readLine() |
private java.lang.String |
readString(int offset,
BytesRefBuilder scratch) |
java.lang.String |
toString() |
getMergeInstanceequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetChildResourcesprivate static final long BASE_RAM_BYTES_USED
private long[] offsets
private IndexInput in
private BytesRefBuilder scratch
private CharsRefBuilder scratchUTF16
public SimpleTextTermVectorsReader(Directory directory, SegmentInfo si, IOContext context) throws java.io.IOException
java.io.IOExceptionSimpleTextTermVectorsReader(long[] offsets,
IndexInput in)
private void readIndex(int maxDoc)
throws java.io.IOException
java.io.IOExceptionpublic Fields get(int doc) throws java.io.IOException
TermVectorsReaderOffsetAttribute
available from the PostingsEnum.get in class TermVectorsReaderjava.io.IOExceptionpublic TermVectorsReader clone()
TermVectorsReaderclone in class TermVectorsReaderpublic void close()
throws java.io.IOException
java.io.IOExceptionprivate void readLine()
throws java.io.IOException
java.io.IOExceptionprivate int parseIntAt(int offset)
private java.lang.String readString(int offset,
BytesRefBuilder scratch)
public long ramBytesUsed()
Accountablepublic java.lang.String toString()
toString in class java.lang.Objectpublic void checkIntegrity()
throws java.io.IOException
TermVectorsReaderNote that this may be costly in terms of I/O, e.g. may involve computing a checksum value against large data files.
checkIntegrity in class TermVectorsReaderjava.io.IOException