Class Lucene50CompressingStoredFieldsReader
- java.lang.Object
-
- org.apache.lucene.codecs.StoredFieldsReader
-
- org.apache.lucene.backward_codecs.lucene50.compressing.Lucene50CompressingStoredFieldsReader
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable,java.lang.Cloneable
public final class Lucene50CompressingStoredFieldsReader extends StoredFieldsReader
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private classLucene50CompressingStoredFieldsReader.BlockStateKeeps state about the current block of documents.(package private) static classLucene50CompressingStoredFieldsReader.SerializedDocumentA serialized document, you need to decode its input in order to get an actualDocument.
-
Field Summary
Fields Modifier and Type Field Description (package private) static intBYTE_ARRprivate intchunkSizeprivate booleanclosedprivate CompressionModecompressionMode(package private) static longDAY(package private) static intDAY_ENCODINGprivate Decompressordecompressorprivate FieldInfosfieldInfosstatic java.lang.StringFIELDS_EXTENSIONExtension of stored fields fileprivate IndexInputfieldsStream(package private) static longHOUR(package private) static intHOUR_ENCODINGstatic java.lang.StringINDEX_CODEC_NAMECodec name for the index.static java.lang.StringINDEX_EXTENSIONExtension of stored fields indexprivate FieldsIndexindexReaderprivate longmaxPointerprivate booleanmergingstatic java.lang.StringMETA_EXTENSIONExtension of stored fields meta(package private) static intMETA_VERSION_STARTprivate intnumDocs(package private) static intNUMERIC_DOUBLE(package private) static intNUMERIC_FLOAT(package private) static intNUMERIC_INT(package private) static intNUMERIC_LONGprivate intpackedIntsVersion(package private) static longSECOND(package private) static intSECOND_ENCODINGprivate Lucene50CompressingStoredFieldsReader.BlockStatestate(package private) static intSTRING(package private) static intTYPE_BITS(package private) static intTYPE_MASKprivate intversion(package private) static intVERSION_CURRENT(package private) static intVERSION_METAVersion where all metadata were moved to the meta file.(package private) static intVERSION_NUM_CHUNKSVersion where numChunks is explicitly recorded in meta file and a dirty chunk bit is recorded in each chunk(package private) static intVERSION_OFFHEAP_INDEX(package private) static intVERSION_START
-
Constructor Summary
Constructors Modifier Constructor Description privateLucene50CompressingStoredFieldsReader(Lucene50CompressingStoredFieldsReader reader, boolean merging)Lucene50CompressingStoredFieldsReader(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) Lucene50CompressingStoredFieldsReader.SerializedDocumentdocument(int docID)private voidensureOpen()StoredFieldsReadergetMergeInstance()Returns an instance optimized for merging.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
-
FIELDS_EXTENSION
public static final java.lang.String FIELDS_EXTENSION
Extension of stored fields file- See Also:
- Constant Field Values
-
INDEX_EXTENSION
public static final java.lang.String INDEX_EXTENSION
Extension of stored fields index- See Also:
- Constant Field Values
-
META_EXTENSION
public static final java.lang.String META_EXTENSION
Extension of stored fields meta- See Also:
- Constant Field Values
-
INDEX_CODEC_NAME
public static final java.lang.String INDEX_CODEC_NAME
Codec name for the index.- See Also:
- Constant Field Values
-
STRING
static final int STRING
- See Also:
- Constant Field Values
-
BYTE_ARR
static final int BYTE_ARR
- See Also:
- Constant Field Values
-
NUMERIC_INT
static final int NUMERIC_INT
- See Also:
- Constant Field Values
-
NUMERIC_FLOAT
static final int NUMERIC_FLOAT
- See Also:
- Constant Field Values
-
NUMERIC_LONG
static final int NUMERIC_LONG
- See Also:
- Constant Field Values
-
NUMERIC_DOUBLE
static final int NUMERIC_DOUBLE
- See Also:
- Constant Field Values
-
TYPE_BITS
static final int TYPE_BITS
-
TYPE_MASK
static final int TYPE_MASK
-
VERSION_START
static final int VERSION_START
- See Also:
- Constant Field Values
-
VERSION_OFFHEAP_INDEX
static final int VERSION_OFFHEAP_INDEX
- See Also:
- Constant Field Values
-
VERSION_META
static final int VERSION_META
Version where all metadata were moved to the meta file.- See Also:
- Constant Field Values
-
VERSION_NUM_CHUNKS
static final int VERSION_NUM_CHUNKS
Version where numChunks is explicitly recorded in meta file and a dirty chunk bit is recorded in each chunk- See Also:
- Constant Field Values
-
VERSION_CURRENT
static final int VERSION_CURRENT
- See Also:
- Constant Field Values
-
META_VERSION_START
static final int META_VERSION_START
- See Also:
- Constant Field Values
-
SECOND
static final long SECOND
- See Also:
- Constant Field Values
-
HOUR
static final long HOUR
- See Also:
- Constant Field Values
-
DAY
static final long DAY
- See Also:
- Constant Field Values
-
SECOND_ENCODING
static final int SECOND_ENCODING
- See Also:
- Constant Field Values
-
HOUR_ENCODING
static final int HOUR_ENCODING
- See Also:
- Constant Field Values
-
DAY_ENCODING
static final int DAY_ENCODING
- See Also:
- Constant Field Values
-
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
-
packedIntsVersion
private final int packedIntsVersion
-
compressionMode
private final CompressionMode compressionMode
-
decompressor
private final Decompressor decompressor
-
numDocs
private final int numDocs
-
merging
private final boolean merging
-
state
private final Lucene50CompressingStoredFieldsReader.BlockState state
-
closed
private boolean closed
-
-
Constructor Detail
-
Lucene50CompressingStoredFieldsReader
private Lucene50CompressingStoredFieldsReader(Lucene50CompressingStoredFieldsReader reader, boolean merging)
-
Lucene50CompressingStoredFieldsReader
public Lucene50CompressingStoredFieldsReader(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
Lucene50CompressingStoredFieldsReader.SerializedDocument document(int docID) throws java.io.IOException
- Throws:
java.io.IOException
-
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
-
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
-
-