java.lang.Object
org.elasticsearch.index.codec.tsdb.pipeline.numeric.NumericEncoder

public final class NumericEncoder extends Object
Write-path coordinator for pipeline-based numeric encoding. This is the entry point used by the doc values consumer to encode numeric fields. It owns a NumericEncodePipeline and produces NumericBlockEncoder instances for per-block encoding.

Instances are immutable and thread-safe. Per-field mutable state lives in NumericBlockEncoder, which callers obtain via newBlockEncoder().

Created via fromConfig(org.elasticsearch.index.codec.tsdb.pipeline.PipelineConfig) or via NumericCodecFactory.createEncoder(org.elasticsearch.index.codec.tsdb.pipeline.PipelineConfig).

  • Method Details

    • newBlockEncoder

      public NumericBlockEncoder newBlockEncoder()
      Creates a new block encoder with its own mutable encoding context.
      Returns:
      a fresh block encoder
    • descriptor

      public PipelineDescriptor descriptor()
      Returns the pipeline descriptor for persistence via FieldDescriptor.
      Returns:
      the pipeline descriptor
    • blockSize

      public int blockSize()
      Returns the number of values per block.
      Returns:
      the number of values per block