Interface Aggregator.Parser
- Enclosing class:
- Aggregator
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface
public static interface Aggregator.Parser
Parses the aggregation request and creates the appropriate aggregator factory for it.
- See Also:
AggregationBuilder
-
Method Summary
Modifier and Type Method Description AggregationBuilder
parse(java.lang.String aggregationName, org.elasticsearch.common.xcontent.XContentParser parser)
Returns the aggregator factory with which this parser is associated, may returnnull
indicating the aggregation should be skipped (e.g.
-
Method Details
-
parse
AggregationBuilder parse(java.lang.String aggregationName, org.elasticsearch.common.xcontent.XContentParser parser) throws java.io.IOExceptionReturns the aggregator factory with which this parser is associated, may returnnull
indicating the aggregation should be skipped (e.g. when trying to aggregate on unmapped fields).- Parameters:
aggregationName
- The name of the aggregationparser
- The parser- Returns:
- The resolved aggregator factory or
null
in case the aggregation should be skipped - Throws:
java.io.IOException
- When parsing fails
-