Module org.elasticsearch.server
Class ES819TSDBDocValuesFormat
java.lang.Object
org.apache.lucene.codecs.DocValuesFormat
org.elasticsearch.index.codec.tsdb.es819.ES819TSDBDocValuesFormat
- All Implemented Interfaces:
org.apache.lucene.util.NamedSPILoader.NamedSPI
- Direct Known Subclasses:
ES819Version3TSDBDocValuesFormat
public class ES819TSDBDocValuesFormat
extends org.apache.lucene.codecs.DocValuesFormat
Evolved from
ES87TSDBDocValuesFormat and has the following changes:
- Moved numDocsWithField metadata statistic from SortedNumericEntry to NumericEntry. This allows for always summing numDocsWithField during segment merging, otherwise numDocsWithField needs to be computed for each segment merge per field.
- Moved docsWithFieldOffset, docsWithFieldLength, jumpTableEntryCount, denseRankPower metadata properties in the format to be after values metadata. So that the jump table can be stored after the values, which allows for iterating once over the merged view of all values. If index sorting is active merging a doc value field requires a merge sort which can be very cpu intensive. The previous format always has to merge sort a doc values field multiple times, so doing the merge sort just once saves on cpu resources.
- Version 1 adds block-wise compression to binary doc values. Each block contains a variable number of values so that each
block is approximately the same size. To map a given value's index to the block containing the value, there are two parallel
arrays. These contain the starting address for each block, and the starting value index for each block. Additional compression
types may be added by creating a new mode in
BinaryDVCompressionMode.
-
Constructor Summary
ConstructorsConstructorDescriptionES819TSDBDocValuesFormat(int numericBlockShift) ES819TSDBDocValuesFormat(int skipIndexIntervalSize, int minDocsPerOrdinalForRangeEncoding, boolean enableOptimizedMerge, BinaryDVCompressionMode binaryDVCompressionMode, boolean enablePerBlockCompression) Doc values fields format with specified skipIndexIntervalSize.ES819TSDBDocValuesFormat(int skipIndexIntervalSize, int minDocsPerOrdinalForRangeEncoding, boolean enableOptimizedMerge, BinaryDVCompressionMode binaryDVCompressionMode, boolean enablePerBlockCompression, int numericBlockShift) ES819TSDBDocValuesFormat(String codecName, int skipIndexIntervalSize, int minDocsPerOrdinalForRangeEncoding, boolean enableOptimizedMerge, BinaryDVCompressionMode binaryDVCompressionMode, boolean enablePerBlockCompression, int numericBlockShift, DocOffsetsCodec docOffsetsCodec) ES819TSDBDocValuesFormat(String codecName, int skipIndexIntervalSize, int minDocsPerOrdinalForRangeEncoding, boolean enableOptimizedMerge, BinaryDVCompressionMode binaryDVCompressionMode, boolean enablePerBlockCompression, int numericBlockShift, DocOffsetsCodec docOffsetsCodec, int blockBytesThreshold, int blockCountThreshold) ES819TSDBDocValuesFormat(String codecName, int skipIndexIntervalSize, int minDocsPerOrdinalForRangeEncoding, boolean enableOptimizedMerge, BinaryDVCompressionMode binaryDVCompressionMode, boolean enablePerBlockCompression, int numericBlockShift, DocOffsetsCodec docOffsetsCodec, int blockBytesThreshold, int blockCountThreshold, boolean writePrefixPartitions) ES819TSDBDocValuesFormat(BinaryDVCompressionMode binaryDVCompressionMode) ES819TSDBDocValuesFormat(BinaryDVCompressionMode binaryDVCompressionMode, boolean enablePerBlockCompression) -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.lucene.codecs.DocValuesConsumerfieldsConsumer(org.apache.lucene.index.SegmentWriteState state) org.apache.lucene.codecs.DocValuesProducerfieldsProducer(org.apache.lucene.index.SegmentReadState state) static ES819TSDBDocValuesFormatgetInstance(boolean useLargeNumericBlock) Methods inherited from class org.apache.lucene.codecs.DocValuesFormat
availableDocValuesFormats, forName, getName, reloadDocValuesFormats, toString
-
Constructor Details
-
ES819TSDBDocValuesFormat
public ES819TSDBDocValuesFormat() -
ES819TSDBDocValuesFormat
public ES819TSDBDocValuesFormat(int numericBlockShift) -
ES819TSDBDocValuesFormat
-
ES819TSDBDocValuesFormat
public ES819TSDBDocValuesFormat(BinaryDVCompressionMode binaryDVCompressionMode, boolean enablePerBlockCompression) -
ES819TSDBDocValuesFormat
public ES819TSDBDocValuesFormat(int skipIndexIntervalSize, int minDocsPerOrdinalForRangeEncoding, boolean enableOptimizedMerge, BinaryDVCompressionMode binaryDVCompressionMode, boolean enablePerBlockCompression) Doc values fields format with specified skipIndexIntervalSize. -
ES819TSDBDocValuesFormat
public ES819TSDBDocValuesFormat(int skipIndexIntervalSize, int minDocsPerOrdinalForRangeEncoding, boolean enableOptimizedMerge, BinaryDVCompressionMode binaryDVCompressionMode, boolean enablePerBlockCompression, int numericBlockShift) -
ES819TSDBDocValuesFormat
public ES819TSDBDocValuesFormat(String codecName, int skipIndexIntervalSize, int minDocsPerOrdinalForRangeEncoding, boolean enableOptimizedMerge, BinaryDVCompressionMode binaryDVCompressionMode, boolean enablePerBlockCompression, int numericBlockShift, DocOffsetsCodec docOffsetsCodec) -
ES819TSDBDocValuesFormat
public ES819TSDBDocValuesFormat(String codecName, int skipIndexIntervalSize, int minDocsPerOrdinalForRangeEncoding, boolean enableOptimizedMerge, BinaryDVCompressionMode binaryDVCompressionMode, boolean enablePerBlockCompression, int numericBlockShift, DocOffsetsCodec docOffsetsCodec, int blockBytesThreshold, int blockCountThreshold) -
ES819TSDBDocValuesFormat
public ES819TSDBDocValuesFormat(String codecName, int skipIndexIntervalSize, int minDocsPerOrdinalForRangeEncoding, boolean enableOptimizedMerge, BinaryDVCompressionMode binaryDVCompressionMode, boolean enablePerBlockCompression, int numericBlockShift, DocOffsetsCodec docOffsetsCodec, int blockBytesThreshold, int blockCountThreshold, boolean writePrefixPartitions)
-
-
Method Details
-
getInstance
-
fieldsConsumer
public org.apache.lucene.codecs.DocValuesConsumer fieldsConsumer(org.apache.lucene.index.SegmentWriteState state) throws IOException - Specified by:
fieldsConsumerin classorg.apache.lucene.codecs.DocValuesFormat- Throws:
IOException
-
fieldsProducer
public org.apache.lucene.codecs.DocValuesProducer fieldsProducer(org.apache.lucene.index.SegmentReadState state) throws IOException - Specified by:
fieldsProducerin classorg.apache.lucene.codecs.DocValuesFormat- Throws:
IOException
-