public abstract class DeferableBucketAggregator extends BucketsAggregator
Aggregator.Parser, Aggregator.SubAggCollectionMode
collectableSubAggregators, context, DEFAULT_WEIGHT, name, parent, subAggregators
NO_OP_COLLECTOR
Modifier | Constructor and Description |
---|---|
protected |
DeferableBucketAggregator(java.lang.String name,
AggregatorFactories factories,
SearchContext context,
Aggregator parent,
java.util.List<PipelineAggregator> pipelineAggregators,
java.util.Map<java.lang.String,java.lang.Object> metaData) |
Modifier and Type | Method and Description |
---|---|
protected void |
doPreCollection()
Can be overridden by aggregator implementation to be called back when the collection phase starts.
|
DeferringBucketCollector |
getDeferringCollector() |
protected void |
runDeferredCollections(long... bucketOrds) |
protected boolean |
shouldDefer(Aggregator aggregator)
This method should be overridden by subclasses that want to defer
calculation of a child aggregation until a first pass is complete and a
set of buckets has been pruned.
|
bucketAggregations, bucketDocCount, bucketEmptyAggregations, close, collectBucket, collectExistingBucket, getDocCounts, grow, incrementBucketDocCount, maxBucketOrd
addRequestCircuitBreakerBytes, buildEmptySubAggregations, context, doClose, doPostCollection, getLeafCollector, getLeafCollector, metaData, name, needsScores, parent, pipelineAggregators, postCollection, preCollection, preGetSubLeafCollectors, subAggregator, subAggregators, toString
buildAggregation, buildEmptyAggregation, descendsFromBucketAggregator
wrap
protected DeferableBucketAggregator(java.lang.String name, AggregatorFactories factories, SearchContext context, Aggregator parent, java.util.List<PipelineAggregator> pipelineAggregators, java.util.Map<java.lang.String,java.lang.Object> metaData) throws java.io.IOException
java.io.IOException
protected void doPreCollection() throws java.io.IOException
AggregatorBase
doPreCollection
in class AggregatorBase
java.io.IOException
public DeferringBucketCollector getDeferringCollector()
protected boolean shouldDefer(Aggregator aggregator)
runDeferredCollections(long...)
for the selected set
of buckets that survive the pruning.aggregator
- the child aggregatorprotected final void runDeferredCollections(long... bucketOrds) throws java.io.IOException
java.io.IOException