Class Aggregator
java.lang.Object
org.elasticsearch.search.aggregations.BucketCollector
org.elasticsearch.search.aggregations.Aggregator
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
,org.apache.lucene.search.Collector
,Releasable
- Direct Known Subclasses:
AggregatorBase
,AggregatorFactory.MultiBucketAggregatorWrapper
,DeferringBucketCollector.WrappedAggregator
,ProfilingAggregator
public abstract class Aggregator extends BucketCollector implements Releasable
An Aggregator.
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
Aggregator.Parser
Parses the aggregation request and creates the appropriate aggregator factory for it.static class
Aggregator.SubAggCollectionMode
Aggregation mode for sub aggregations. -
Field Summary
-
Constructor Summary
Constructors Constructor Description Aggregator()
-
Method Summary
Modifier and Type Method Description abstract InternalAggregation
buildAggregation(long bucket)
Build an aggregation for data that has been collected intobucket
.abstract InternalAggregation
buildEmptyAggregation()
Build an empty aggregation.abstract SearchContext
context()
Return theSearchContext
attached with thisAggregator
.static boolean
descendsFromBucketAggregator(Aggregator parent)
Returns whether one of the parents is aBucketsAggregator
.abstract java.lang.String
name()
Return the name of this aggregator.abstract Aggregator
parent()
Return the parent aggregator.abstract Aggregator
subAggregator(java.lang.String name)
Return the sub aggregator with the provided name.Methods inherited from class org.elasticsearch.search.aggregations.BucketCollector
getLeafCollector, postCollection, preCollection
-
Constructor Details
-
Aggregator
public Aggregator()
-
-
Method Details
-
descendsFromBucketAggregator
Returns whether one of the parents is aBucketsAggregator
. -
name
public abstract java.lang.String name()Return the name of this aggregator. -
context
Return theSearchContext
attached with thisAggregator
. -
parent
Return the parent aggregator. -
subAggregator
Return the sub aggregator with the provided name. -
buildAggregation
Build an aggregation for data that has been collected intobucket
.- Throws:
java.io.IOException
-
buildEmptyAggregation
Build an empty aggregation.
-