Class SamplerAggregator

All Implemented Interfaces:
Closeable, AutoCloseable,, org.elasticsearch.core.Releasable, SingleBucketAggregator
Direct Known Subclasses:
DiversifiedBytesHashSamplerAggregator, DiversifiedMapSamplerAggregator, DiversifiedNumericSamplerAggregator, DiversifiedOrdinalsSamplerAggregator

public class SamplerAggregator extends DeferableBucketAggregator implements SingleBucketAggregator
Aggregate on only the top-scoring docs on a shard. TODO currently the diversity feature of this agg offers only 'script' and 'field' as a means of generating a de-dup value. In future it would be nice if users could use any of the "bucket" aggs syntax (geo, date histogram...) as the basis for generating de-dup values. Their syntax for creating bucket values would be preferable to users having to recreate this logic in a 'script' e.g. to turn a datetime in milliseconds into a month key value.
  • Field Details


      public static final org.elasticsearch.common.xcontent.ParseField SHARD_SIZE_FIELD

      public static final org.elasticsearch.common.xcontent.ParseField MAX_DOCS_PER_VALUE_FIELD

      public static final org.elasticsearch.common.xcontent.ParseField EXECUTION_HINT_FIELD
    • shardSize

      protected final int shardSize
    • bdd

  • Method Details