Class AggregatorFactories
java.lang.Object
org.opensearch.search.aggregations.AggregatorFactories
An immutable collection of
AggregatorFactories
.- Opensearch.api:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
A mutable collection ofAggregationBuilder
s andPipelineAggregationBuilder
s. -
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
static AggregatorFactories.Builder
builder()
int
createSubAggregators
(SearchContext searchContext, Aggregator parent, CardinalityUpperBound cardinality) Create all aggregators so that they can be consumed with multiple buckets.createTopLevelAggregators
(SearchContext searchContext) createTopLevelGlobalAggregators
(SearchContext searchContext) createTopLevelNonGlobalAggregators
(SearchContext searchContext) boolean
boolean
static AggregatorFactories.Builder
parseAggregators
(org.opensearch.core.xcontent.XContentParser parser) Parses the aggregation request recursively generating aggregator factories in turn.
-
Field Details
-
VALID_AGG_NAME
-
EMPTY
-
-
Method Details
-
parseAggregators
public static AggregatorFactories.Builder parseAggregators(org.opensearch.core.xcontent.XContentParser parser) throws IOException Parses the aggregation request recursively generating aggregator factories in turn.- Throws:
IOException
-
builder
-
allFactoriesSupportConcurrentSearch
public boolean allFactoriesSupportConcurrentSearch() -
createSubAggregators
public Aggregator[] createSubAggregators(SearchContext searchContext, Aggregator parent, CardinalityUpperBound cardinality) throws IOException Create 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:
IOException
-
createTopLevelAggregators
- Throws:
IOException
-
createTopLevelGlobalAggregators
public List<Aggregator> createTopLevelGlobalAggregators(SearchContext searchContext) throws IOException - Throws:
IOException
-
createTopLevelNonGlobalAggregators
public List<Aggregator> createTopLevelNonGlobalAggregators(SearchContext searchContext) throws IOException - Throws:
IOException
-
hasNonGlobalAggregator
public boolean hasNonGlobalAggregator() -
hasGlobalAggregator
public boolean hasGlobalAggregator() -
countAggregators
public int countAggregators()- Returns:
- the number of sub-aggregator factories
-