public abstract class MultiValuesSourceParser<VS extends ValuesSource> extends java.lang.Object implements Aggregator.Parser
| Modifier and Type | Class and Description |
|---|---|
static class |
MultiValuesSourceParser.AnyValuesSourceParser |
static class |
MultiValuesSourceParser.BytesValuesSourceParser |
static class |
MultiValuesSourceParser.GeoPointValuesSourceParser |
static class |
MultiValuesSourceParser.NumericValuesSourceParser |
| Modifier and Type | Method and Description |
|---|---|
protected abstract MultiValuesSourceAggregationBuilder<VS,?> |
createFactory(java.lang.String aggregationName,
ValuesSourceType valuesSourceType,
ValueType targetValueType,
java.util.Map<ParseField,java.lang.Object> otherOptions)
Creates a
ValuesSourceAggregationBuilder from the information
gathered by the subclass. |
MultiValuesSourceAggregationBuilder<VS,?> |
parse(java.lang.String aggregationName,
QueryParseContext context) |
protected abstract boolean |
token(java.lang.String aggregationName,
java.lang.String currentFieldName,
XContentParser.Token token,
XContentParser parser,
java.util.Map<ParseField,java.lang.Object> otherOptions)
Allows subclasses of
MultiValuesSourceParser to parse extra
parameters and store them in a Map which will later be passed to
createFactory(String, ValuesSourceType, ValueType, Map). |
public final MultiValuesSourceAggregationBuilder<VS,?> parse(java.lang.String aggregationName, QueryParseContext context) throws java.io.IOException
parse in interface Aggregator.Parserjava.io.IOExceptionprotected abstract MultiValuesSourceAggregationBuilder<VS,?> createFactory(java.lang.String aggregationName, ValuesSourceType valuesSourceType, ValueType targetValueType, java.util.Map<ParseField,java.lang.Object> otherOptions)
ValuesSourceAggregationBuilder from the information
gathered by the subclass. Options parsed in
MultiValuesSourceParser itself will be added to the factory
after it has been returned by this method.aggregationName - the name of the aggregationvaluesSourceType - the type of the ValuesSourcetargetValueType - the target type of the final value output by the aggregationotherOptions - a Map containing the extra options parsed by the
token(String, String, XContentParser.Token, XContentParser, Map)
methodprotected abstract boolean token(java.lang.String aggregationName,
java.lang.String currentFieldName,
XContentParser.Token token,
XContentParser parser,
java.util.Map<ParseField,java.lang.Object> otherOptions)
throws java.io.IOException
MultiValuesSourceParser to parse extra
parameters and store them in a Map which will later be passed to
createFactory(String, ValuesSourceType, ValueType, Map).aggregationName - the name of the aggregationcurrentFieldName - the name of the current field being parsedtoken - the current token for the parserparser - the parserotherOptions - a Map of options to be populated by successive calls
to this method which will then be passed to the
createFactory(String, ValuesSourceType, ValueType, Map)
methodtrue if the current token was correctly parsed,
false otherwisejava.io.IOException - if an error occurs whilst parsing