Class CompressingTermVectorsReader
java.lang.Object
org.apache.lucene.codecs.TermVectorsReader
org.apache.lucene.codecs.compressing.CompressingTermVectorsReader
- All Implemented Interfaces:
Closeable,AutoCloseable,Cloneable,Accountable
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate classprivate static classprivate static classprivate static class -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final intprivate booleanprivate final CompressionModeprivate final Decompressorprivate final FieldInfos(package private) final FieldsIndexprivate final longprivate final longprivate final longprivate final intprivate final intprivate final BlockPackedReaderIterator(package private) final IndexInputprivate final intFields inherited from interface org.apache.lucene.util.Accountable
NULL_ACCOUNTABLE -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateCompressingTermVectorsReader(Directory d, SegmentInfo si, String segmentSuffix, FieldInfos fn, IOContext context, String formatName, CompressionMode compressionMode) Sole constructor. -
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()private voidget(int doc) Returns term vectors for this document, or null if term vectors were not indexed.Returns nested resources of this class.(package private) int(package private) CompressionMode(package private) FieldsIndex(package private) long(package private) long(package private) long(package private) int(package private) int(package private) IndexInput(package private) intprivate int[][]positionIndex(int skip, int numFields, PackedInts.Reader numTerms, int[] termFreqs) longReturn 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 intsum(int[] arr) toString()Methods inherited from class org.apache.lucene.codecs.TermVectorsReader
getMergeInstance
-
Field Details
-
fieldInfos
-
indexReader
-
vectorsStream
-
version
private final int version -
packedIntsVersion
private final int packedIntsVersion -
compressionMode
-
decompressor
-
chunkSize
private final int chunkSize -
numDocs
private final int numDocs -
closed
private boolean closed -
reader
-
numDirtyChunks
private final long numDirtyChunks -
numDirtyDocs
private final long numDirtyDocs -
maxPointer
private final long maxPointer
-
-
Constructor Details
-
CompressingTermVectorsReader
-
CompressingTermVectorsReader
public CompressingTermVectorsReader(Directory d, SegmentInfo si, String segmentSuffix, FieldInfos fn, IOContext context, String formatName, CompressionMode compressionMode) throws IOException Sole constructor.- Throws:
IOException
-
-
Method Details
-
getCompressionMode
CompressionMode getCompressionMode() -
getChunkSize
int getChunkSize() -
getPackedIntsVersion
int getPackedIntsVersion() -
getVersion
int getVersion() -
getIndexReader
FieldsIndex getIndexReader() -
getVectorsStream
IndexInput getVectorsStream() -
getMaxPointer
long getMaxPointer() -
getNumDirtyDocs
long getNumDirtyDocs() -
getNumDirtyChunks
long getNumDirtyChunks() -
getNumDocs
int getNumDocs() -
ensureOpen
- Throws:
AlreadyClosedException- if this TermVectorsReader is closed
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- 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
-
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
-
positionIndex
-
readPositions
private int[][] readPositions(int skip, int numFields, PackedInts.Reader flags, PackedInts.Reader numTerms, int[] termFreqs, int flag, int totalPositions, int[][] positionIndex) throws IOException - Throws:
IOException
-
sum
private static int sum(int[] arr) -
ramBytesUsed
public long ramBytesUsed()Description copied from interface:AccountableReturn the memory usage of this object in bytes. Negative values are illegal.- Specified by:
ramBytesUsedin interfaceAccountable
-
getChildResources
Description copied from interface:AccountableReturns nested resources of this class. The result should be a point-in-time snapshot (to avoid race conditions).- Specified by:
getChildResourcesin interfaceAccountable- See Also:
-
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
-
toString
-