Class Lucene50CompressingStoredFieldsReader
java.lang.Object
org.apache.lucene.index.StoredFields
org.apache.lucene.codecs.StoredFieldsReader
org.apache.lucene.backward_codecs.lucene50.compressing.Lucene50CompressingStoredFieldsReader
- 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 TypeFieldDescription(package private) static final int
private final int
private boolean
private final CompressionMode
(package private) static final long
(package private) static final int
private final Decompressor
private final FieldInfos
static final String
Extension of stored fields fileprivate final IndexInput
(package private) static final long
(package private) static final int
static final String
Codec name for the index.static final String
Extension of stored fields indexprivate final FieldsIndex
private final long
private final boolean
static final String
Extension of stored fields meta(package private) static final int
private final int
(package private) static final int
(package private) static final int
(package private) static final int
(package private) static final int
private final int
(package private) static final long
(package private) static final int
private final Lucene50CompressingStoredFieldsReader.BlockState
(package private) static final int
(package private) static final int
(package private) static final int
private final int
(package private) static final int
(package private) static final int
Version where all metadata were moved to the meta file.(package private) static final int
Version where numChunks is explicitly recorded in meta file and a dirty chunk bit is recorded in each chunk(package private) static final int
(package private) static final int
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
Lucene50CompressingStoredFieldsReader
(Lucene50CompressingStoredFieldsReader reader, boolean merging) Lucene50CompressingStoredFieldsReader
(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
Returns an instance optimized for merging.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) Lucene50CompressingStoredFieldsReader.SerializedDocument
serializedDocument
(int docID) private static void
toString()
Methods inherited from class org.apache.lucene.index.StoredFields
document, document, prefetch
-
Field Details
-
FIELDS_EXTENSION
Extension of stored fields file- See Also:
-
INDEX_EXTENSION
Extension of stored fields index- See Also:
-
META_EXTENSION
Extension of stored fields meta- See Also:
-
INDEX_CODEC_NAME
Codec name for the index.- See Also:
-
STRING
static final int STRING- See Also:
-
BYTE_ARR
static final int BYTE_ARR- See Also:
-
NUMERIC_INT
static final int NUMERIC_INT- See Also:
-
NUMERIC_FLOAT
static final int NUMERIC_FLOAT- See Also:
-
NUMERIC_LONG
static final int NUMERIC_LONG- See Also:
-
NUMERIC_DOUBLE
static final int NUMERIC_DOUBLE- See Also:
-
TYPE_BITS
static final int TYPE_BITS -
TYPE_MASK
static final int TYPE_MASK -
VERSION_START
static final int VERSION_START- See Also:
-
VERSION_OFFHEAP_INDEX
static final int VERSION_OFFHEAP_INDEX- See Also:
-
VERSION_META
static final int VERSION_METAVersion where all metadata were moved to the meta file.- See Also:
-
VERSION_NUM_CHUNKS
static final int VERSION_NUM_CHUNKSVersion where numChunks is explicitly recorded in meta file and a dirty chunk bit is recorded in each chunk- See Also:
-
VERSION_CURRENT
static final int VERSION_CURRENT- See Also:
-
META_VERSION_START
static final int META_VERSION_START- See Also:
-
SECOND
static final long SECOND- See Also:
-
HOUR
static final long HOUR- See Also:
-
DAY
static final long DAY- See Also:
-
SECOND_ENCODING
static final int SECOND_ENCODING- See Also:
-
HOUR_ENCODING
static final int HOUR_ENCODING- See Also:
-
DAY_ENCODING
static final int DAY_ENCODING- See Also:
-
version
private final int version -
fieldInfos
-
indexReader
-
maxPointer
private final long maxPointer -
fieldsStream
-
chunkSize
private final int chunkSize -
packedIntsVersion
private final int packedIntsVersion -
compressionMode
-
decompressor
-
numDocs
private final int numDocs -
merging
private final boolean merging -
state
-
closed
private boolean closed
-
-
Constructor Details
-
Lucene50CompressingStoredFieldsReader
private Lucene50CompressingStoredFieldsReader(Lucene50CompressingStoredFieldsReader reader, boolean merging) -
Lucene50CompressingStoredFieldsReader
public Lucene50CompressingStoredFieldsReader(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
Lucene50CompressingStoredFieldsReader.SerializedDocument serializedDocument(int docID) throws IOException - Throws:
IOException
-
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
-
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
-