public abstract class BucketsAggregator extends Aggregator
Aggregator.BucketAggregationMode, Aggregator.Parser, Aggregator.SubAggCollectionModeBucketCollector.BucketAnalysisCollectorbigArrays, bucketAggregationMode, COLLECT_MODE, collectableSubAggregators, context, depth, estimatedBucketCount, factories, name, parent, subAggregatorsNO_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, subAggregatorscollect, wrapclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitsetNextReaderpublic 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
IOExceptionprotected final void collectExistingBucket(int doc,
long bucketOrd)
throws IOException
collectBucket(int, long), but doesn't check if the docCounts needs to be re-sized.IOExceptionpublic IntArray getDocCounts()
protected final void collectBucketNoCounts(int doc,
long bucketOrd)
throws IOException
IOExceptionprotected final void incrementBucketDocCount(long bucketOrd,
int inc)
throws IOException
IOExceptionpublic final int bucketDocCount(long bucketOrd)
protected final InternalAggregations bucketAggregations(long bucketOrd)
protected final InternalAggregations bucketEmptyAggregations()
public final void close()
Aggregatorclose in interface AutoCloseableclose in interface Releasableclose in class AggregatorCopyright © 2009–2016. All rights reserved.