public abstract class BucketsAggregator extends Aggregator
Aggregator.BucketAggregationMode, Aggregator.Parser, Aggregator.SubAggCollectionMode
BucketCollector.BucketAnalysisCollector
bigArrays, bucketAggregationMode, COLLECT_MODE, collectableSubAggregators, context, depth, estimatedBucketCount, factories, name, parent, subAggregators
NO_OP_COLLECTOR
Constructor and Description |
---|
BucketsAggregator(String name,
Aggregator.BucketAggregationMode bucketAggregationMode,
AggregatorFactories factories,
long estimatedBucketsCount,
AggregationContext context,
Aggregator parent) |
Modifier and Type | Method and Description |
---|---|
protected InternalAggregations |
bucketAggregations(long bucketOrd)
Required method to build the child aggregations of the given bucket (identified by the bucket ordinal).
|
int |
bucketDocCount(long bucketOrd)
Utility method to return the number of documents that fell in the given bucket (identified by the bucket ordinal)
|
protected InternalAggregations |
bucketEmptyAggregations()
Utility method to build empty aggregations of the sub aggregators.
|
void |
close()
Called upon release of the aggregator.
|
protected void |
collectBucket(int doc,
long bucketOrd)
Utility method to collect the given doc in the given bucket (identified by the bucket ordinal)
|
protected void |
collectBucketNoCounts(int doc,
long bucketOrd)
Utility method to collect the given doc in the given bucket but not to update the doc counts of the bucket
|
protected void |
collectExistingBucket(int doc,
long bucketOrd)
Same as
collectBucket(int, long) , but doesn't check if the docCounts needs to be re-sized. |
IntArray |
getDocCounts() |
protected void |
incrementBucketDocCount(long bucketOrd,
int inc)
Utility method to increment the doc counts of the given bucket (identified by the bucket ordinal)
|
protected long |
maxBucketOrd()
Return an upper bound of the maximum bucket ordinal seen so far.
|
bucketAggregationMode, buildAggregation, buildEmptyAggregation, buildEmptySubAggregations, context, depth, doClose, doPostCollection, estimatedBucketCount, gatherAnalysis, hasParentBucketAggregator, name, parent, postCollection, preCollection, runDeferredCollections, shouldCollect, shouldDefer, subAggregator, subAggregators
collect, wrap
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
setNextReader
public BucketsAggregator(String name, Aggregator.BucketAggregationMode bucketAggregationMode, AggregatorFactories factories, long estimatedBucketsCount, AggregationContext context, Aggregator parent)
protected final long maxBucketOrd()
protected final void collectBucket(int doc, long bucketOrd) throws IOException
IOException
protected final void collectExistingBucket(int doc, long bucketOrd) throws IOException
collectBucket(int, long)
, but doesn't check if the docCounts needs to be re-sized.IOException
public IntArray getDocCounts()
protected final void collectBucketNoCounts(int doc, long bucketOrd) throws IOException
IOException
protected final void incrementBucketDocCount(long bucketOrd, int inc) throws IOException
IOException
public final int bucketDocCount(long bucketOrd)
protected final InternalAggregations bucketAggregations(long bucketOrd)
protected final InternalAggregations bucketEmptyAggregations()
public final void close()
Aggregator
close
in interface AutoCloseable
close
in interface Releasable
close
in class Aggregator
Copyright © 2009–2015. All rights reserved.