public final class Lucene70DocValuesFormat extends DocValuesFormat
Documents that have a value for the field are encoded in a way that it is always possible to know the ordinal of the current document in the set of documents that have a value. For instance, say the set of documents that have a value for the field is {1, 5, 6, 11}. When the iterator is on 6, it knows that this is the 3rd item of the set. This way, values can be stored densely and accessed based on their index at search time. If all documents in a segment have a value for the field, the index is the same as the doc ID, so this case is encoded implicitly and is very fast at query time. On the other hand if some documents are missing a value for the field then the set of documents that have a value is encoded into blocks. All doc IDs that share the same upper 16 bits are encoded into the same block with the following strategies:
shorts
while the upper
16 bits are given by the block ID.
ntz
operations while the index is computed by
accumulating the bit counts
of the visited longs.
index sorting
.
Then the five per-document value types (Numeric,Binary,Sorted,SortedSet,SortedNumeric) are encoded using the following strategies:
DirectWriter
.
SmallFloat
),
a lookup table is written instead. Each per-document entry is instead the ordinal
to this table, and those ordinals are compressed with bitpacking (DirectWriter
).
docID * length
).
Files:
Constructor and Description |
---|
Lucene70DocValuesFormat()
Sole Constructor
|
Modifier and Type | Method and Description |
---|---|
DocValuesConsumer |
fieldsConsumer(SegmentWriteState state) |
DocValuesProducer |
fieldsProducer(SegmentReadState state) |
availableDocValuesFormats, forName, getName, reloadDocValuesFormats, toString
public DocValuesConsumer fieldsConsumer(SegmentWriteState state) throws IOException
fieldsConsumer
in class DocValuesFormat
IOException
public DocValuesProducer fieldsProducer(SegmentReadState state) throws IOException
fieldsProducer
in class DocValuesFormat
IOException
Copyright © 2000-2021 Apache Software Foundation. All Rights Reserved.