public final class CompressingStoredFieldsIndexWriter extends Object implements Closeable
Codec
s.
This writer generates a file which can be loaded into memory using memory-efficient data structures to quickly locate the block that contains any document.
In order to have a compact in-memory representation, for every block of 1024 chunks, this index computes the average number of bytes per chunk and for every chunk, only stores the difference between
Data is written as follows:
PackedInts.VERSION_CURRENT
as a VInt
VInt
, this marks the end of blocks since blocks are not allowed to start with 0VInt
which is the number of chunks encoded in the blockVInt
VInt
packed
array of BlockChunks elements of BitsPerDocBaseDelta bits each, representing the deltas from the average doc base using ZigZag encoding.VLong
VLong
packed
array of BlockChunks elements of BitsPerStartPointerDelta bits each, representing the deltas from the average start pointer using ZigZag encodingCodecFooter
Notes
DocBase + AvgChunkDocs * n + DocBaseDeltas[n]
.StartPointerBase + AvgChunkSize * n + StartPointerDeltas[n]
.public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
Copyright © 2000-2016 Apache Software Foundation. All Rights Reserved.