public class AggregatorParsers extends Object
Modifier and Type | Field and Description |
---|---|
static Pattern |
VALID_AGG_NAME |
Constructor and Description |
---|
AggregatorParsers(Set<Aggregator.Parser> aggParsers,
Set<PipelineAggregator.Parser> pipelineAggregatorParsers)
Constructs the AggregatorParsers out of all the given parsers
|
Modifier and Type | Method and Description |
---|---|
AggregatorFactories |
parseAggregators(XContentParser parser,
SearchContext context)
Parses the aggregation request recursively generating aggregator factories in turn.
|
Aggregator.Parser |
parser(String type)
Returns the parser that is registered under the given aggregation type.
|
PipelineAggregator.Parser |
pipelineAggregator(String type)
Returns the parser that is registered under the given pipeline aggregator
type.
|
public static final Pattern VALID_AGG_NAME
@Inject public AggregatorParsers(Set<Aggregator.Parser> aggParsers, Set<PipelineAggregator.Parser> pipelineAggregatorParsers)
aggParsers
- The available aggregator parsers (dynamically injected by the
SearchModule
).public Aggregator.Parser parser(String type)
type
- The aggregation typepublic PipelineAggregator.Parser pipelineAggregator(String type)
type
- The pipeline aggregator typepublic AggregatorFactories parseAggregators(XContentParser parser, SearchContext context) throws IOException
parser
- The input xcontent that will be parsed.context
- The search context.IOException
- When parsing fails for unknown reasons.Copyright © 2009–2016. All rights reserved.