Class Lucene90CompressingStoredFieldsReader
- java.lang.Object
-
- org.apache.lucene.codecs.StoredFieldsReader
-
- org.apache.lucene.codecs.lucene90.compressing.Lucene90CompressingStoredFieldsReader
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable,java.lang.Cloneable
public final class Lucene90CompressingStoredFieldsReader extends StoredFieldsReader
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private classLucene90CompressingStoredFieldsReader.BlockStateKeeps state about the current block of documents.(package private) static classLucene90CompressingStoredFieldsReader.SerializedDocumentA serialized document, you need to decode its input in order to get an actualDocument.
-
Field Summary
Fields Modifier and Type Field Description private intchunkSizeprivate booleanclosedprivate CompressionModecompressionModeprivate Decompressordecompressorprivate FieldInfosfieldInfosprivate IndexInputfieldsStreamprivate FieldsIndexindexReaderprivate longmaxPointerprivate booleanmergingprivate longnumChunksprivate longnumDirtyChunksprivate longnumDirtyDocsprivate intnumDocsprivate Lucene90CompressingStoredFieldsReader.BlockStatestateprivate intversion
-
Constructor Summary
Constructors Modifier Constructor Description privateLucene90CompressingStoredFieldsReader(Lucene90CompressingStoredFieldsReader reader, boolean merging)Lucene90CompressingStoredFieldsReader(Directory d, SegmentInfo si, java.lang.String segmentSuffix, FieldInfos fn, IOContext context, java.lang.String formatName, CompressionMode compressionMode)Sole constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcheckIntegrity()Checks consistency of this reader.StoredFieldsReaderclone()voidclose()Close the underlyingIndexInputs.(package private) Lucene90CompressingStoredFieldsReader.SerializedDocumentdocument(int docID)private voidensureOpen()(package private) intgetChunkSize()(package private) CompressionModegetCompressionMode()(package private) IndexInputgetFieldsStream()(package private) FieldsIndexgetIndexReader()(package private) longgetMaxPointer()StoredFieldsReadergetMergeInstance()Returns an instance optimized for merging.(package private) longgetNumChunks()(package private) longgetNumDirtyChunks()(package private) longgetNumDirtyDocs()(package private) intgetNumDocs()(package private) intgetVersion()(package private) booleanisLoaded(int docID)Checks if a given docID was loaded in the current block state.private static voidreadField(DataInput in, StoredFieldVisitor visitor, FieldInfo info, int bits)(package private) static longreadTLong(DataInput in)Reads a long in a variable-length format.(package private) static doublereadZDouble(DataInput in)Reads a double in a variable-length format.(package private) static floatreadZFloat(DataInput in)Reads a float in a variable-length format.private static voidskipField(DataInput in, int bits)java.lang.StringtoString()voidvisitDocument(int docID, StoredFieldVisitor visitor)Visit the stored fields for documentdocID
-
-
-
Field Detail
-
version
private final int version
-
fieldInfos
private final FieldInfos fieldInfos
-
indexReader
private final FieldsIndex indexReader
-
maxPointer
private final long maxPointer
-
fieldsStream
private final IndexInput fieldsStream
-
chunkSize
private final int chunkSize
-
compressionMode
private final CompressionMode compressionMode
-
decompressor
private final Decompressor decompressor
-
numDocs
private final int numDocs
-
merging
private final boolean merging
-
state
private final Lucene90CompressingStoredFieldsReader.BlockState state
-
numChunks
private final long numChunks
-
numDirtyChunks
private final long numDirtyChunks
-
numDirtyDocs
private final long numDirtyDocs
-
closed
private boolean closed
-
-
Constructor Detail
-
Lucene90CompressingStoredFieldsReader
private Lucene90CompressingStoredFieldsReader(Lucene90CompressingStoredFieldsReader reader, boolean merging)
-
Lucene90CompressingStoredFieldsReader
public Lucene90CompressingStoredFieldsReader(Directory d, SegmentInfo si, java.lang.String segmentSuffix, FieldInfos fn, IOContext context, java.lang.String formatName, CompressionMode compressionMode) throws java.io.IOException
Sole constructor.- Throws:
java.io.IOException
-
-
Method Detail
-
ensureOpen
private void ensureOpen() throws AlreadyClosedException- Throws:
AlreadyClosedException- if this FieldsReader is closed
-
close
public void close() throws java.io.IOExceptionClose the underlyingIndexInputs.- Throws:
java.io.IOException
-
readField
private static void readField(DataInput in, StoredFieldVisitor visitor, FieldInfo info, int bits) throws java.io.IOException
- Throws:
java.io.IOException
-
skipField
private static void skipField(DataInput in, int bits) throws java.io.IOException
- Throws:
java.io.IOException
-
readZFloat
static float readZFloat(DataInput in) throws java.io.IOException
Reads a float in a variable-length format. Reads between one and five bytes. Small integral values typically take fewer bytes.- Throws:
java.io.IOException
-
readZDouble
static double readZDouble(DataInput in) throws java.io.IOException
Reads a double in a variable-length format. Reads between one and nine bytes. Small integral values typically take fewer bytes.- Throws:
java.io.IOException
-
readTLong
static long readTLong(DataInput in) throws java.io.IOException
Reads a long in a variable-length format. Reads between one andCorePropLo nine bytes. Small values typically take fewer bytes.- Throws:
java.io.IOException
-
document
Lucene90CompressingStoredFieldsReader.SerializedDocument document(int docID) throws java.io.IOException
- Throws:
java.io.IOException
-
isLoaded
boolean isLoaded(int docID)
Checks if a given docID was loaded in the current block state.
-
visitDocument
public void visitDocument(int docID, StoredFieldVisitor visitor) throws java.io.IOExceptionDescription copied from class:StoredFieldsReaderVisit the stored fields for documentdocID- Specified by:
visitDocumentin classStoredFieldsReader- Throws:
java.io.IOException
-
clone
public StoredFieldsReader clone()
- Specified by:
clonein classStoredFieldsReader
-
getMergeInstance
public StoredFieldsReader getMergeInstance()
Description copied from class:StoredFieldsReaderReturns an instance optimized for merging. This instance may not be cloned.The default implementation returns
this- Overrides:
getMergeInstancein classStoredFieldsReader
-
getVersion
int getVersion()
-
getCompressionMode
CompressionMode getCompressionMode()
-
getIndexReader
FieldsIndex getIndexReader()
-
getMaxPointer
long getMaxPointer()
-
getFieldsStream
IndexInput getFieldsStream()
-
getChunkSize
int getChunkSize()
-
getNumDirtyDocs
long getNumDirtyDocs()
-
getNumDirtyChunks
long getNumDirtyChunks()
-
getNumChunks
long getNumChunks()
-
getNumDocs
int getNumDocs()
-
checkIntegrity
public void checkIntegrity() throws java.io.IOExceptionDescription copied from class:StoredFieldsReaderChecks 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 classStoredFieldsReader- Throws:
java.io.IOException
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-