Class InternalGeoGrid<B extends InternalGeoGridBucket>
- java.lang.Object
-
- org.elasticsearch.search.aggregations.InternalAggregation
-
- org.elasticsearch.search.aggregations.InternalMultiBucketAggregation<InternalGeoGrid,InternalGeoGridBucket>
-
- org.elasticsearch.search.aggregations.bucket.geogrid.InternalGeoGrid<B>
-
- All Implemented Interfaces:
NamedWriteable
,Writeable
,ToXContent
,ToXContentFragment
,Aggregation
,GeoGrid
,MultiBucketsAggregation
- Direct Known Subclasses:
InternalGeoHashGrid
,InternalGeoTileGrid
public abstract class InternalGeoGrid<B extends InternalGeoGridBucket> extends InternalMultiBucketAggregation<InternalGeoGrid,InternalGeoGridBucket> implements GeoGrid
Represents a grid of cells where each cell's location is determined by a specific geo hashing algorithm. All geo-grid hash-encoding in a grid are of the same precision and held internally as a single long for efficiency's sake.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.elasticsearch.search.aggregations.InternalMultiBucketAggregation
InternalMultiBucketAggregation.InternalBucket
-
Nested classes/interfaces inherited from class org.elasticsearch.search.aggregations.InternalAggregation
InternalAggregation.ReduceContext
-
Nested classes/interfaces inherited from interface org.elasticsearch.search.aggregations.Aggregation
Aggregation.CommonFields
-
Nested classes/interfaces inherited from interface org.elasticsearch.search.aggregations.bucket.geogrid.GeoGrid
GeoGrid.Bucket
-
Nested classes/interfaces inherited from interface org.elasticsearch.search.aggregations.bucket.MultiBucketsAggregation
MultiBucketsAggregation.Bucket
-
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 java.util.List<InternalGeoGridBucket>
buckets
protected int
requiredSize
-
Fields inherited from class org.elasticsearch.search.aggregations.InternalAggregation
metaData, name
-
Fields inherited from interface org.elasticsearch.search.aggregations.Aggregation
TYPED_KEYS_DELIMITER
-
Fields inherited from interface org.elasticsearch.common.xcontent.ToXContent
EMPTY_PARAMS
-
-
Constructor Summary
Constructors Constructor Description InternalGeoGrid(StreamInput in)
Read from a stream.
-
Method Summary
Modifier and Type Method Description InternalGeoGrid
doReduce(java.util.List<InternalAggregation> aggregations, InternalAggregation.ReduceContext reduceContext)
protected void
doWriteTo(StreamOutput out)
XContentBuilder
doXContentBody(XContentBuilder builder, ToXContent.Params params)
boolean
equals(java.lang.Object obj)
java.util.List<InternalGeoGridBucket>
getBuckets()
int
hashCode()
protected InternalGeoGridBucket
reduceBucket(java.util.List<InternalGeoGridBucket> buckets, InternalAggregation.ReduceContext context)
Reduce a list of same-keyed buckets (from multiple shards) to a single bucket.-
Methods inherited from class org.elasticsearch.search.aggregations.InternalMultiBucketAggregation
countInnerBucket, countInnerBucket, create, createBucket, getProperty
-
Methods inherited from class org.elasticsearch.search.aggregations.InternalAggregation
getMetaData, getName, getProperty, getType, isMapped, pipelineAggregators, readSize, reduce, toString, toXContent, writeSize, writeTo
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.elasticsearch.search.aggregations.Aggregation
getMetaData, getName, getType
-
Methods inherited from interface org.elasticsearch.common.io.stream.NamedWriteable
getWriteableName
-
Methods inherited from interface org.elasticsearch.common.xcontent.ToXContent
toXContent
-
Methods inherited from interface org.elasticsearch.common.xcontent.ToXContentFragment
isFragment
-
-
-
-
Field Detail
-
requiredSize
protected final int requiredSize
-
buckets
protected final java.util.List<InternalGeoGridBucket> buckets
-
-
Constructor Detail
-
InternalGeoGrid
public InternalGeoGrid(StreamInput in) throws java.io.IOException
Read from a stream.- Throws:
java.io.IOException
-
-
Method Detail
-
doWriteTo
protected void doWriteTo(StreamOutput out) throws java.io.IOException
- Specified by:
doWriteTo
in classInternalAggregation
- Throws:
java.io.IOException
-
getBuckets
public java.util.List<InternalGeoGridBucket> getBuckets()
- Specified by:
getBuckets
in interfaceGeoGrid
- Specified by:
getBuckets
in interfaceMultiBucketsAggregation
- Specified by:
getBuckets
in classInternalMultiBucketAggregation<InternalGeoGrid,InternalGeoGridBucket>
- Returns:
- The buckets of this aggregation.
-
doReduce
public InternalGeoGrid doReduce(java.util.List<InternalAggregation> aggregations, InternalAggregation.ReduceContext reduceContext)
- Specified by:
doReduce
in classInternalAggregation
-
reduceBucket
protected InternalGeoGridBucket reduceBucket(java.util.List<InternalGeoGridBucket> buckets, InternalAggregation.ReduceContext context)
Description copied from class:InternalMultiBucketAggregation
Reduce a list of same-keyed buckets (from multiple shards) to a single bucket. This requires all buckets to have the same key.- Specified by:
reduceBucket
in classInternalMultiBucketAggregation<InternalGeoGrid,InternalGeoGridBucket>
-
doXContentBody
public XContentBuilder doXContentBody(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
- Specified by:
doXContentBody
in classInternalAggregation
- Throws:
java.io.IOException
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classInternalAggregation
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classInternalAggregation
-
-