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 class
Lucene90CompressingStoredFieldsReader.BlockState
Keeps state about the current block of documents.(package private) static class
Lucene90CompressingStoredFieldsReader.SerializedDocument
A serialized document, you need to decode its input in order to get an actualDocument
.
-
Field Summary
Fields Modifier and Type Field Description private int
chunkSize
private boolean
closed
private CompressionMode
compressionMode
private Decompressor
decompressor
private FieldInfos
fieldInfos
private IndexInput
fieldsStream
private FieldsIndex
indexReader
private long
maxPointer
private boolean
merging
private long
numChunks
private long
numDirtyChunks
private long
numDirtyDocs
private int
numDocs
private Lucene90CompressingStoredFieldsReader.BlockState
state
private int
version
-
Constructor Summary
Constructors Modifier Constructor Description private
Lucene90CompressingStoredFieldsReader(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 void
checkIntegrity()
Checks consistency of this reader.StoredFieldsReader
clone()
void
close()
Close the underlyingIndexInput
s.(package private) Lucene90CompressingStoredFieldsReader.SerializedDocument
document(int docID)
private void
ensureOpen()
(package private) int
getChunkSize()
(package private) CompressionMode
getCompressionMode()
(package private) IndexInput
getFieldsStream()
(package private) FieldsIndex
getIndexReader()
(package private) long
getMaxPointer()
StoredFieldsReader
getMergeInstance()
Returns an instance optimized for merging.(package private) long
getNumChunks()
(package private) long
getNumDirtyChunks()
(package private) long
getNumDirtyDocs()
(package private) int
getNumDocs()
(package private) int
getVersion()
(package private) boolean
isLoaded(int docID)
Checks if a given docID was loaded in the current block state.private static void
readField(DataInput in, StoredFieldVisitor visitor, FieldInfo info, int bits)
(package private) static long
readTLong(DataInput in)
Reads a long in a variable-length format.(package private) static double
readZDouble(DataInput in)
Reads a double in a variable-length format.(package private) static float
readZFloat(DataInput in)
Reads a float in a variable-length format.private static void
skipField(DataInput in, int bits)
java.lang.String
toString()
void
visitDocument(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.IOException
Close the underlyingIndexInput
s.- 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.IOException
Description copied from class:StoredFieldsReader
Visit the stored fields for documentdocID
- Specified by:
visitDocument
in classStoredFieldsReader
- Throws:
java.io.IOException
-
clone
public StoredFieldsReader clone()
- Specified by:
clone
in classStoredFieldsReader
-
getMergeInstance
public StoredFieldsReader getMergeInstance()
Description copied from class:StoredFieldsReader
Returns an instance optimized for merging. This instance may not be cloned.The default implementation returns
this
- Overrides:
getMergeInstance
in 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.IOException
Description copied from class:StoredFieldsReader
Checks 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:
checkIntegrity
in classStoredFieldsReader
- Throws:
java.io.IOException
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-