public class AggregatorParsers
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.util.regex.Pattern |
VALID_AGG_NAME |
Constructor and Description |
---|
AggregatorParsers(ParseFieldRegistry<Aggregator.Parser> aggregationParserRegistry,
ParseFieldRegistry<PipelineAggregator.Parser> pipelineAggregationParserRegistry) |
Modifier and Type | Method and Description |
---|---|
AggregatorFactories.Builder |
parseAggregators(QueryParseContext parseContext)
Parses the aggregation request recursively generating aggregator factories in turn.
|
Aggregator.Parser |
parser(java.lang.String type)
Returns the parser that is registered under the given aggregation type.
|
PipelineAggregator.Parser |
pipelineParser(java.lang.String type)
Returns the parser that is registered under the given pipeline aggregator type.
|
public AggregatorParsers(ParseFieldRegistry<Aggregator.Parser> aggregationParserRegistry, ParseFieldRegistry<PipelineAggregator.Parser> pipelineAggregationParserRegistry)
public Aggregator.Parser parser(java.lang.String type)
type
- The aggregation typepublic PipelineAggregator.Parser pipelineParser(java.lang.String type)
type
- The pipeline aggregator typepublic AggregatorFactories.Builder parseAggregators(QueryParseContext parseContext) throws java.io.IOException
parseContext
- The parse context.java.io.IOException
- When parsing fails for unknown reasons.