public class HistogramParser extends AbstractValuesSourceParser.NumericValuesSourceParser
AbstractValuesSourceParser.AnyValuesSourceParser, AbstractValuesSourceParser.BytesValuesSourceParser, AbstractValuesSourceParser.GeoPointValuesSourceParser, AbstractValuesSourceParser.NumericValuesSourceParser
Modifier | Constructor and Description |
---|---|
|
HistogramParser() |
protected |
HistogramParser(boolean timezoneAware) |
Modifier and Type | Method and Description |
---|---|
protected AbstractHistogramBuilder<?> |
createFactory(java.lang.String aggregationName,
ValuesSourceType valuesSourceType,
ValueType targetValueType,
java.util.Map<ParseField,java.lang.Object> otherOptions)
Creates a
ValuesSourceAggregatorBuilder from the information
gathered by the subclass. |
AbstractHistogramBuilder<?> |
getFactoryPrototypes() |
protected java.lang.Object |
parseStringInterval(java.lang.String interval) |
protected long |
parseStringOffset(java.lang.String offset) |
protected boolean |
token(java.lang.String aggregationName,
java.lang.String currentFieldName,
XContentParser.Token token,
XContentParser parser,
ParseFieldMatcher parseFieldMatcher,
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) . |
java.lang.String |
type() |
parse
public HistogramParser()
protected HistogramParser(boolean timezoneAware)
public java.lang.String type()
protected AbstractHistogramBuilder<?> createFactory(java.lang.String aggregationName, ValuesSourceType valuesSourceType, ValueType targetValueType, java.util.Map<ParseField,java.lang.Object> otherOptions)
AbstractValuesSourceParser
ValuesSourceAggregatorBuilder
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, org.elasticsearch.common.xcontent.XContentParser.Token,
XContentParser, ParseFieldMatcher, Map)
methodprotected boolean token(java.lang.String aggregationName, java.lang.String currentFieldName, XContentParser.Token token, XContentParser parser, ParseFieldMatcher parseFieldMatcher, 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 parserparser
- the parserparseFieldMatcher
- the ParseFieldMatcher
to use to match field namesotherOptions
- 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 java.lang.Object parseStringInterval(java.lang.String interval)
protected long parseStringOffset(java.lang.String offset) throws java.io.IOException
java.io.IOException
public AbstractHistogramBuilder<?> getFactoryPrototypes()
AggregatorBuilder
instance for this parser
that can be used for deserialization