Class SamplerAggregator

All Implemented Interfaces:
Closeable, AutoCloseable,, 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.