public final class Lucene60PointsFormat extends PointsFormat
This data structure is written as a series of blocks on disk, with an in-memory perfectly balanced binary tree of split values referencing those blocks at the leaves.
The .dim
file has both blocks and the index split
values, for each field. The file starts with CodecUtil.writeIndexHeader(org.apache.lucene.store.DataOutput, java.lang.String, int, byte[], java.lang.String)
.
The blocks are written like this:
byte[]
value of each dimension packed into a single byte[]
)
After all blocks for a field are written, then the index is written:
The packed index uses hierarchical delta and prefix coding to compactly encode the file pointer for all leaf blocks, once the tree is traversed, as well as the split dimension and split value for each inner node of the tree.
After all fields blocks + index data are written, CodecUtil.writeFooter(org.apache.lucene.store.IndexOutput)
writes the checksum.
The .dii
file records the file pointer in the .dim
file where each field's
index data was written. It starts with CodecUtil.writeIndexHeader(org.apache.lucene.store.DataOutput, java.lang.String, int, byte[], java.lang.String)
, then has:
After all fields blocks + index data are written, CodecUtil.writeFooter(org.apache.lucene.store.IndexOutput)
writes the checksum.
Modifier and Type | Field and Description |
---|---|
(package private) static java.lang.String |
DATA_CODEC_NAME |
static java.lang.String |
DATA_EXTENSION
Filename extension for the leaf blocks
|
(package private) static int |
DATA_VERSION_CURRENT |
(package private) static int |
DATA_VERSION_START |
static java.lang.String |
INDEX_EXTENSION
Filename extension for the index per field
|
(package private) static int |
INDEX_VERSION_CURRENT |
(package private) static int |
INDEX_VERSION_START |
(package private) static java.lang.String |
META_CODEC_NAME |
EMPTY
Constructor and Description |
---|
Lucene60PointsFormat()
Sole constructor
|
Modifier and Type | Method and Description |
---|---|
PointsReader |
fieldsReader(SegmentReadState state)
Reads a segment.
|
PointsWriter |
fieldsWriter(SegmentWriteState state)
Writes a new segment
|
static final java.lang.String DATA_CODEC_NAME
static final java.lang.String META_CODEC_NAME
public static final java.lang.String DATA_EXTENSION
public static final java.lang.String INDEX_EXTENSION
static final int DATA_VERSION_START
static final int DATA_VERSION_CURRENT
static final int INDEX_VERSION_START
static final int INDEX_VERSION_CURRENT
public PointsWriter fieldsWriter(SegmentWriteState state) throws java.io.IOException
PointsFormat
fieldsWriter
in class PointsFormat
java.io.IOException
public PointsReader fieldsReader(SegmentReadState state) throws java.io.IOException
PointsFormat
fieldsReader
in class PointsFormat
java.io.IOException