Module org.apache.lucene.core
Class Lucene90CompressingStoredFieldsReader
java.lang.Object
org.apache.lucene.index.StoredFields
org.apache.lucene.codecs.StoredFieldsReader
org.apache.lucene.codecs.lucene90.compressing.Lucene90CompressingStoredFieldsReader
- All Implemented Interfaces:
Closeable
,AutoCloseable
,Cloneable
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate class
Keeps state about the current block of documents.(package private) static class
A serialized document, you need to decode its input in order to get an actualDocument
. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final int
private boolean
private final CompressionMode
private final Decompressor
private final FieldInfos
private final IndexInput
private final FieldsIndex
private final long
private final boolean
private final long
private final long
private final long
private final int
private final Lucene90CompressingStoredFieldsReader.BlockState
private final int
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
Lucene90CompressingStoredFieldsReader
(Lucene90CompressingStoredFieldsReader reader, boolean merging) Lucene90CompressingStoredFieldsReader
(Directory d, SegmentInfo si, String segmentSuffix, FieldInfos fn, IOContext context, String formatName, CompressionMode compressionMode) Sole constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Checks consistency of this reader.clone()
void
close()
Close the underlyingIndexInput
s.void
document
(int docID, StoredFieldVisitor visitor) Expert: visits the fields of a stored document, for custom processing/loading of each field.private void
(package private) int
(package private) CompressionMode
(package private) IndexInput
(package private) FieldsIndex
(package private) long
Returns an instance optimized for merging.(package private) long
(package private) long
(package private) long
(package private) int
(package private) int
(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
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.(package private) Lucene90CompressingStoredFieldsReader.SerializedDocument
serializedDocument
(int docID) private static void
toString()
Methods inherited from class org.apache.lucene.index.StoredFields
document, document
-
Field Details
-
version
private final int version -
fieldInfos
-
indexReader
-
maxPointer
private final long maxPointer -
fieldsStream
-
chunkSize
private final int chunkSize -
compressionMode
-
decompressor
-
numDocs
private final int numDocs -
merging
private final boolean merging -
state
-
numChunks
private final long numChunks -
numDirtyChunks
private final long numDirtyChunks -
numDirtyDocs
private final long numDirtyDocs -
closed
private boolean closed
-
-
Constructor Details
-
Lucene90CompressingStoredFieldsReader
private Lucene90CompressingStoredFieldsReader(Lucene90CompressingStoredFieldsReader reader, boolean merging) -
Lucene90CompressingStoredFieldsReader
public Lucene90CompressingStoredFieldsReader(Directory d, SegmentInfo si, String segmentSuffix, FieldInfos fn, IOContext context, String formatName, CompressionMode compressionMode) throws IOException Sole constructor.- Throws:
IOException
-
-
Method Details
-
ensureOpen
- Throws:
AlreadyClosedException
- if this FieldsReader is closed
-
close
Close the underlyingIndexInput
s.- Throws:
IOException
-
readField
private static void readField(DataInput in, StoredFieldVisitor visitor, FieldInfo info, int bits) throws IOException - Throws:
IOException
-
skipField
- Throws:
IOException
-
readZFloat
Reads a float in a variable-length format. Reads between one and five bytes. Small integral values typically take fewer bytes.- Throws:
IOException
-
readZDouble
Reads a double in a variable-length format. Reads between one and nine bytes. Small integral values typically take fewer bytes.- Throws:
IOException
-
readTLong
Reads a long in a variable-length format. Reads between one andCorePropLo nine bytes. Small values typically take fewer bytes.- Throws:
IOException
-
serializedDocument
Lucene90CompressingStoredFieldsReader.SerializedDocument serializedDocument(int docID) throws IOException - Throws:
IOException
-
isLoaded
boolean isLoaded(int docID) Checks if a given docID was loaded in the current block state. -
document
Description copied from class:StoredFields
Expert: visits the fields of a stored document, for custom processing/loading of each field. If you simply want to load all fields, useStoredFields.document(int)
. If you want to load a subset, useDocumentStoredFieldVisitor
.- Specified by:
document
in classStoredFields
- Throws:
IOException
-
clone
- Specified by:
clone
in classStoredFieldsReader
-
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
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:
IOException
-
toString
-