Class AggregatorFactories
- java.lang.Object
-
- org.elasticsearch.search.aggregations.AggregatorFactories
-
public class AggregatorFactories extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAggregatorFactories.AggParseContextContext to parse and aggregation.static classAggregatorFactories.Builder
-
Field Summary
Fields Modifier and Type Field Description static AggregatorFactoriesEMPTYstatic PatternVALID_AGG_NAME
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static AggregatorFactories.Builderbuilder()intcountAggregators()intcountPipelineAggregators()List<PipelineAggregator>createPipelineAggregators()Aggregator[]createSubAggregators(SearchContext searchContext, Aggregator parent)Create all aggregators so that they can be consumed with multiple buckets.Aggregator[]createTopLevelAggregators(SearchContext searchContext)static AggregatorFactories.BuilderparseAggregators(XContentParser parser)Parses the aggregation request recursively generating aggregator factories in turn.
-
-
-
Field Detail
-
VALID_AGG_NAME
public static final Pattern VALID_AGG_NAME
-
EMPTY
public static final AggregatorFactories EMPTY
-
-
Method Detail
-
parseAggregators
public static AggregatorFactories.Builder parseAggregators(XContentParser parser) throws IOException
Parses the aggregation request recursively generating aggregator factories in turn.- Throws:
IOException
-
builder
public static AggregatorFactories.Builder builder()
-
createPipelineAggregators
public List<PipelineAggregator> createPipelineAggregators()
-
createSubAggregators
public Aggregator[] createSubAggregators(SearchContext searchContext, Aggregator parent) throws IOException
Create all aggregators so that they can be consumed with multiple buckets.- Throws:
IOException
-
createTopLevelAggregators
public Aggregator[] createTopLevelAggregators(SearchContext searchContext) throws IOException
- Throws:
IOException
-
countAggregators
public int countAggregators()
- Returns:
- the number of sub-aggregator factories not including pipeline aggregator factories
-
countPipelineAggregators
public int countPipelineAggregators()
- Returns:
- the number of pipeline aggregator factories
-
-