public final class CompressingTermVectorsReader extends TermVectorsReader implements java.io.Closeable
Modifier and Type | Class and Description |
---|---|
private class |
CompressingTermVectorsReader.TVFields |
private static class |
CompressingTermVectorsReader.TVPostingsEnum |
private static class |
CompressingTermVectorsReader.TVTerms |
private static class |
CompressingTermVectorsReader.TVTermsEnum |
Modifier and Type | Field and Description |
---|---|
private int |
chunkSize |
private boolean |
closed |
private CompressionMode |
compressionMode |
private Decompressor |
decompressor |
private FieldInfos |
fieldInfos |
(package private) CompressingStoredFieldsIndexReader |
indexReader |
private long |
maxPointer |
private long |
numChunks |
private long |
numDirtyChunks |
private int |
numDocs |
private int |
packedIntsVersion |
private BlockPackedReaderIterator |
reader |
(package private) IndexInput |
vectorsStream |
private int |
version |
Modifier | Constructor and Description |
---|---|
private |
CompressingTermVectorsReader(CompressingTermVectorsReader reader) |
|
CompressingTermVectorsReader(Directory d,
SegmentInfo si,
java.lang.String segmentSuffix,
FieldInfos fn,
IOContext context,
java.lang.String formatName,
CompressionMode compressionMode)
Sole constructor.
|
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() |
private void |
ensureOpen() |
Fields |
get(int doc)
Returns term vectors for this document, or null if
term vectors were not indexed.
|
java.util.Collection<Accountable> |
getChildResources()
Returns nested resources of this class.
|
(package private) int |
getChunkSize() |
(package private) CompressionMode |
getCompressionMode() |
(package private) CompressingStoredFieldsIndexReader |
getIndexReader() |
(package private) long |
getMaxPointer() |
(package private) long |
getNumChunks() |
(package private) long |
getNumDirtyChunks() |
(package private) int |
getPackedIntsVersion() |
(package private) IndexInput |
getVectorsStream() |
(package private) int |
getVersion() |
private int[][] |
positionIndex(int skip,
int numFields,
PackedInts.Reader numTerms,
int[] termFreqs) |
long |
ramBytesUsed()
Return the memory usage of this object in bytes.
|
private int[][] |
readPositions(int skip,
int numFields,
PackedInts.Reader flags,
PackedInts.Reader numTerms,
int[] termFreqs,
int flag,
int totalPositions,
int[][] positionIndex) |
private static int |
sum(int[] arr) |
java.lang.String |
toString() |
getMergeInstance
private final FieldInfos fieldInfos
final CompressingStoredFieldsIndexReader indexReader
final IndexInput vectorsStream
private final int version
private final int packedIntsVersion
private final CompressionMode compressionMode
private final Decompressor decompressor
private final int chunkSize
private final int numDocs
private boolean closed
private final BlockPackedReaderIterator reader
private final long numChunks
private final long numDirtyChunks
private final long maxPointer
private CompressingTermVectorsReader(CompressingTermVectorsReader reader)
public CompressingTermVectorsReader(Directory d, SegmentInfo si, java.lang.String segmentSuffix, FieldInfos fn, IOContext context, java.lang.String formatName, CompressionMode compressionMode) throws java.io.IOException
java.io.IOException
CompressionMode getCompressionMode()
int getChunkSize()
int getPackedIntsVersion()
int getVersion()
CompressingStoredFieldsIndexReader getIndexReader()
IndexInput getVectorsStream()
long getMaxPointer()
long getNumChunks()
long getNumDirtyChunks()
private void ensureOpen() throws AlreadyClosedException
AlreadyClosedException
- if this TermVectorsReader is closedpublic void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
java.io.IOException
public TermVectorsReader clone()
TermVectorsReader
clone
in class TermVectorsReader
public Fields get(int doc) throws java.io.IOException
TermVectorsReader
OffsetAttribute
available from the PostingsEnum
.get
in class TermVectorsReader
java.io.IOException
private int[][] positionIndex(int skip, int numFields, PackedInts.Reader numTerms, int[] termFreqs)
private int[][] readPositions(int skip, int numFields, PackedInts.Reader flags, PackedInts.Reader numTerms, int[] termFreqs, int flag, int totalPositions, int[][] positionIndex) throws java.io.IOException
java.io.IOException
private static int sum(int[] arr)
public long ramBytesUsed()
Accountable
ramBytesUsed
in interface Accountable
public java.util.Collection<Accountable> getChildResources()
Accountable
getChildResources
in interface Accountable
Accountables
public void checkIntegrity() throws java.io.IOException
TermVectorsReader
Note 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 TermVectorsReader
java.io.IOException
public java.lang.String toString()
toString
in class java.lang.Object