Class DocValuesConsumerUtil

java.lang.Object
org.elasticsearch.index.codec.tsdb.DocValuesConsumerUtil

public class DocValuesConsumerUtil extends Object
Contains logic to determine whether optimized merge can occur.
  • Field Details

  • Constructor Details

    • DocValuesConsumerUtil

      public DocValuesConsumerUtil()
  • Method Details

    • compatibleWithOptimizedMerge

      public static DocValuesConsumerUtil.MergeStats compatibleWithOptimizedMerge(boolean optimizedMergeEnabled, org.apache.lucene.index.MergeState mergeState, org.apache.lucene.index.FieldInfo mergedFieldInfo)
      Determines whether an optimized merge can be performed for the given field by inspecting segment metadata. An optimized merge is possible when all segments use TSDB doc values, the index is pre-sorted, and there are no deleted documents.
      Parameters:
      optimizedMergeEnabled - whether optimized merge is enabled
      mergeState - the merge state containing segment metadata
      mergedFieldInfo - the field to check
      Returns:
      pre-computed stats if optimized merge is possible, or UNSUPPORTED otherwise