public class GeoHashGridParser extends AbstractValuesSourceParser.GeoPointValuesSourceParser
GeoBoundingBoxQueryBuilder
aggregation to focus in on a smaller area to avoid generating too many buckets and using too much RAMAbstractValuesSourceParser.AnyValuesSourceParser, AbstractValuesSourceParser.BytesValuesSourceParser, AbstractValuesSourceParser.GeoPointValuesSourceParser, AbstractValuesSourceParser.NumericValuesSourceParser
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_MAX_NUM_CELLS |
static int |
DEFAULT_PRECISION |
Constructor and Description |
---|
GeoHashGridParser() |
Modifier and Type | Method and Description |
---|---|
protected GeoGridAggregatorBuilder |
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. |
GeoGridAggregatorBuilder |
getFactoryPrototypes() |
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 static final int DEFAULT_PRECISION
public static final int DEFAULT_MAX_NUM_CELLS
public java.lang.String type()
public GeoGridAggregatorBuilder getFactoryPrototypes()
AggregatorBuilder
instance for this parser
that can be used for deserializationprotected GeoGridAggregatorBuilder 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.GeoPoint>
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.GeoPoint>
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 parsing