Class GeoGridAggregationBuilder
java.lang.Object
org.elasticsearch.search.aggregations.AggregationBuilder
org.elasticsearch.search.aggregations.AbstractAggregationBuilder<AB>
org.elasticsearch.search.aggregations.support.ValuesSourceAggregationBuilder<ValuesSource.GeoPoint,GeoGridAggregationBuilder>
org.elasticsearch.search.aggregations.bucket.geogrid.GeoGridAggregationBuilder
- All Implemented Interfaces:
NamedWriteable
,Writeable
,ToXContent
,ToXContentFragment
,BaseAggregationBuilder
,MultiBucketAggregationBuilder
- Direct Known Subclasses:
GeoHashGridAggregationBuilder
,GeoTileGridAggregationBuilder
public abstract class GeoGridAggregationBuilder extends ValuesSourceAggregationBuilder<ValuesSource.GeoPoint,GeoGridAggregationBuilder> implements MultiBucketAggregationBuilder
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static interface
GeoGridAggregationBuilder.PrecisionParser
Nested classes/interfaces inherited from class org.elasticsearch.search.aggregations.support.ValuesSourceAggregationBuilder
ValuesSourceAggregationBuilder.LeafOnly<VS extends ValuesSource,AB extends ValuesSourceAggregationBuilder<VS,AB>>
Nested classes/interfaces inherited from class org.elasticsearch.search.aggregations.AggregationBuilder
AggregationBuilder.CommonFields
Nested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V>
-
Field Summary
Fields Modifier and Type Field Description protected int
precision
protected int
requiredSize
protected int
shardSize
Fields inherited from class org.elasticsearch.search.aggregations.support.ValuesSourceAggregationBuilder
config
Fields inherited from class org.elasticsearch.search.aggregations.AbstractAggregationBuilder
metaData
Fields inherited from class org.elasticsearch.search.aggregations.AggregationBuilder
factoriesBuilder, name
-
Constructor Summary
Constructors Modifier Constructor Description GeoGridAggregationBuilder(java.lang.String name)
GeoGridAggregationBuilder(StreamInput in)
Read from a stream.protected
GeoGridAggregationBuilder(GeoGridAggregationBuilder clone, AggregatorFactories.Builder factoriesBuilder, java.util.Map<java.lang.String,java.lang.Object> metaData)
-
Method Summary
Modifier and Type Method Description protected abstract ValuesSourceAggregatorFactory<ValuesSource.GeoPoint>
createFactory(java.lang.String name, ValuesSourceConfig<ValuesSource.GeoPoint> config, int precision, int requiredSize, int shardSize, GeoBoundingBox geoBoundingBox, QueryShardContext queryShardContext, AggregatorFactory parent, AggregatorFactories.Builder subFactoriesBuilder, java.util.Map<java.lang.String,java.lang.Object> metaData)
Creates a new instance of theValuesSourceAggregatorFactory
-derived class specific to the geo aggregation.static ObjectParser<GeoGridAggregationBuilder,java.lang.Void>
createParser(java.lang.String name, GeoGridAggregationBuilder.PrecisionParser precisionParser)
protected XContentBuilder
doXContentBody(XContentBuilder builder, ToXContent.Params params)
boolean
equals(java.lang.Object obj)
GeoBoundingBox
geoBoundingBox()
int
hashCode()
protected ValuesSourceAggregatorFactory<ValuesSource.GeoPoint>
innerBuild(QueryShardContext queryShardContext, ValuesSourceConfig<ValuesSource.GeoPoint> config, AggregatorFactory parent, AggregatorFactories.Builder subFactoriesBuilder)
protected void
innerWriteTo(StreamOutput out)
Write subclass's state to the stream.int
precision()
abstract GeoGridAggregationBuilder
precision(int precision)
method to validate and set the precision valueGeoGridAggregationBuilder
setGeoBoundingBox(GeoBoundingBox geoBoundingBox)
int
shardSize()
GeoGridAggregationBuilder
shardSize(int shardSize)
int
size()
GeoGridAggregationBuilder
size(int size)
Methods inherited from class org.elasticsearch.search.aggregations.support.ValuesSourceAggregationBuilder
defaultValueType, doBuild, doWriteTo, field, field, format, format, internalXContent, missing, missing, resolveConfig, resolveScriptAny, script, script, serializeTargetValueType, timeZone, timeZone, valueType, valueType
Methods inherited from class org.elasticsearch.search.aggregations.AbstractAggregationBuilder
build, getMetaData, getWriteableName, setMetaData, subAggregation, subAggregation, subAggregations, toXContent, writeTo
Methods inherited from class org.elasticsearch.search.aggregations.AggregationBuilder
doRewrite, getName, getPipelineAggregations, getSubAggregations, rewrite, shallowCopy, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.elasticsearch.search.aggregations.BaseAggregationBuilder
getType
-
Field Details
-
precision
protected int precision -
requiredSize
protected int requiredSize -
shardSize
protected int shardSize
-
-
Constructor Details
-
GeoGridAggregationBuilder
public GeoGridAggregationBuilder(java.lang.String name) -
GeoGridAggregationBuilder
protected GeoGridAggregationBuilder(GeoGridAggregationBuilder clone, AggregatorFactories.Builder factoriesBuilder, java.util.Map<java.lang.String,java.lang.Object> metaData) -
GeoGridAggregationBuilder
Read from a stream.- Throws:
java.io.IOException
-
-
Method Details
-
createParser
public static ObjectParser<GeoGridAggregationBuilder,java.lang.Void> createParser(java.lang.String name, GeoGridAggregationBuilder.PrecisionParser precisionParser) -
innerWriteTo
Description copied from class:ValuesSourceAggregationBuilder
Write subclass's state to the stream.- Specified by:
innerWriteTo
in classValuesSourceAggregationBuilder<ValuesSource.GeoPoint,GeoGridAggregationBuilder>
- Throws:
java.io.IOException
-
precision
method to validate and set the precision value- Parameters:
precision
- the precision to set for the aggregation- Returns:
- the
GeoGridAggregationBuilder
builder
-
createFactory
protected abstract ValuesSourceAggregatorFactory<ValuesSource.GeoPoint> createFactory(java.lang.String name, ValuesSourceConfig<ValuesSource.GeoPoint> config, int precision, int requiredSize, int shardSize, GeoBoundingBox geoBoundingBox, QueryShardContext queryShardContext, AggregatorFactory parent, AggregatorFactories.Builder subFactoriesBuilder, java.util.Map<java.lang.String,java.lang.Object> metaData) throws java.io.IOExceptionCreates a new instance of theValuesSourceAggregatorFactory
-derived class specific to the geo aggregation.- Throws:
java.io.IOException
-
precision
public int precision() -
size
-
size
public int size() -
shardSize
-
shardSize
public int shardSize() -
setGeoBoundingBox
-
geoBoundingBox
-
innerBuild
protected ValuesSourceAggregatorFactory<ValuesSource.GeoPoint> innerBuild(QueryShardContext queryShardContext, ValuesSourceConfig<ValuesSource.GeoPoint> config, AggregatorFactory parent, AggregatorFactories.Builder subFactoriesBuilder) throws java.io.IOException- Specified by:
innerBuild
in classValuesSourceAggregationBuilder<ValuesSource.GeoPoint,GeoGridAggregationBuilder>
- Throws:
java.io.IOException
-
doXContentBody
protected XContentBuilder doXContentBody(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException- Specified by:
doXContentBody
in classValuesSourceAggregationBuilder<ValuesSource.GeoPoint,GeoGridAggregationBuilder>
- Throws:
java.io.IOException
-
equals
public boolean equals(java.lang.Object obj)- Overrides:
equals
in classValuesSourceAggregationBuilder<ValuesSource.GeoPoint,GeoGridAggregationBuilder>
-
hashCode
public int hashCode()- Overrides:
hashCode
in classValuesSourceAggregationBuilder<ValuesSource.GeoPoint,GeoGridAggregationBuilder>
-