Class AggregatorFactories
org.elasticsearch.search.aggregations.AggregatorFactories
public class AggregatorFactories
extends
An immutable collection of
AggregatorFactories
.-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
A mutable collection ofAggregationBuilder
s andPipelineAggregationBuilder
s. -
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic AggregatorFactories.Builder
builder()
context()
int
createSubAggregators(Aggregator parent, CardinalityUpperBound cardinality)
Create all aggregators so that they can be consumed with multiple buckets.fixParent(Aggregator fixedParent)
This returns a copy ofAggregatorFactories
modified so that calls tocreateSubAggregators(org.elasticsearch.search.aggregations.Aggregator, org.elasticsearch.search.aggregations.CardinalityUpperBound)
will ignore the provided parent aggregator and always usefixedParent
provided in to this method.static AggregatorFactories.Builder
parseAggregators(org.elasticsearch.common.xcontent.XContentParser parser)
Parses the aggregation request recursively generating aggregator factories in turn.Methods inherited from class java.lang.
, , , , , , , , , ,
-
Field Details
-
VALID_AGG_NAME
public static final VALID_AGG_NAME -
EMPTY
-
-
Method Details
-
parseAggregators
public static AggregatorFactories.Builder parseAggregators(org.elasticsearch.common.xcontent.XContentParser parser) throwsParses the aggregation request recursively generating aggregator factories in turn.- Throws:
-
builder
-
context
-
createSubAggregators
public Aggregator[] createSubAggregators(Aggregator parent, CardinalityUpperBound cardinality) throwsCreate all aggregators so that they can be consumed with multiple buckets.- Parameters:
cardinality
- Upper bound of the number ofowningBucketOrd
s thatAggregator
s created by this method will be asked to collect.- Throws:
-
createTopLevelAggregators
- Throws:
-
countAggregators
public int countAggregators()- Returns:
- the number of sub-aggregator factories
-
fixParent
This returns a copy ofAggregatorFactories
modified so that calls tocreateSubAggregators(org.elasticsearch.search.aggregations.Aggregator, org.elasticsearch.search.aggregations.CardinalityUpperBound)
will ignore the provided parent aggregator and always usefixedParent
provided in to this method.AdaptingAggregator
uses this to make sure that sub-aggregators get theAdaptingAggregator
aggregator itself as the parent.
-