public abstract class AbstractPercentilesParser extends AbstractValuesSourceParser.NumericValuesSourceParser
AbstractValuesSourceParser.AnyValuesSourceParser, AbstractValuesSourceParser.BytesValuesSourceParser, AbstractValuesSourceParser.GeoPointValuesSourceParser, AbstractValuesSourceParser.NumericValuesSourceParser
Modifier and Type | Field and Description |
---|---|
static ParseField |
COMPRESSION_FIELD |
static ParseField |
KEYED_FIELD |
static ParseField |
METHOD_FIELD |
static ParseField |
NUMBER_SIGNIFICANT_DIGITS_FIELD |
Constructor and Description |
---|
AbstractPercentilesParser(boolean formattable) |
Modifier and Type | Method and Description |
---|---|
protected abstract ValuesSourceAggregationBuilder<ValuesSource.Numeric,?> |
buildFactory(java.lang.String aggregationName,
double[] cdfValues,
PercentilesMethod method,
java.lang.Double compression,
java.lang.Integer numberOfSignificantValueDigits,
java.lang.Boolean keyed) |
protected ValuesSourceAggregationBuilder<ValuesSource.Numeric,?> |
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. |
protected abstract ParseField |
keysField() |
protected boolean |
token(java.lang.String aggregationName,
java.lang.String currentFieldName,
XContentParser.Token token,
XContentParseContext context,
java.util.Map<ParseField,java.lang.Object> otherOptions)
Allows subclasses of
AbstractValuesSourceParser to parse extra
parameters and store them in a Map which will later be passed to
AbstractValuesSourceParser.createFactory(String, ValuesSourceType, ValueType, Map) . |
parse
public static final ParseField KEYED_FIELD
public static final ParseField METHOD_FIELD
public static final ParseField COMPRESSION_FIELD
public static final ParseField NUMBER_SIGNIFICANT_DIGITS_FIELD
protected boolean token(java.lang.String aggregationName, java.lang.String currentFieldName, XContentParser.Token token, XContentParseContext context, java.util.Map<ParseField,java.lang.Object> otherOptions) throws java.io.IOException
AbstractValuesSourceParser
AbstractValuesSourceParser
to parse extra
parameters and store them in a Map
which will later be passed to
AbstractValuesSourceParser.createFactory(String, ValuesSourceType, ValueType, Map)
.token
in class AbstractValuesSourceParser<ValuesSource.Numeric>
aggregationName
- the name of the aggregationcurrentFieldName
- the name of the current field being parsedtoken
- the current token for the parsercontext
- the query contextotherOptions
- a Map
of options to be populated by successive calls
to this method which will then be passed to the
AbstractValuesSourceParser.createFactory(String, ValuesSourceType, ValueType, Map)
methodtrue
if the current token was correctly parsed,
false
otherwisejava.io.IOException
- if an error occurs whilst parsingprotected ValuesSourceAggregationBuilder<ValuesSource.Numeric,?> createFactory(java.lang.String aggregationName, ValuesSourceType valuesSourceType, ValueType targetValueType, java.util.Map<ParseField,java.lang.Object> otherOptions)
AbstractValuesSourceParser
ValuesSourceAggregationBuilder
from the information
gathered by the subclass. Options parsed in
AbstractValuesSourceParser
itself will be added to the factory
after it has been returned by this method.createFactory
in class AbstractValuesSourceParser<ValuesSource.Numeric>
aggregationName
- the name of the aggregationvaluesSourceType
- the type of the ValuesSource
targetValueType
- the target type of the final value output by the aggregationotherOptions
- a Map
containing the extra options parsed by the
AbstractValuesSourceParser.token(String, String, XContentParser.Token, XContentParseContext, Map)
methodprotected abstract ValuesSourceAggregationBuilder<ValuesSource.Numeric,?> buildFactory(java.lang.String aggregationName, double[] cdfValues, PercentilesMethod method, java.lang.Double compression, java.lang.Integer numberOfSignificantValueDigits, java.lang.Boolean keyed)
protected abstract ParseField keysField()