ejsGeoHashGridAggregation

A multi-bucket aggregation that works on geo_point fields and groups points into buckets that represent cells in a grid. The resulting grid can be sparse and only contains cells that have matching data. Each cell is labeled using a geohash which is of user-definable precision.

Module

 GeoHashGridAggregation

GeoHashGridAggregation ( name )

Aggregation that works on geo_point fields and groups points into buckets that represent cells in a grid.


Parameters
name <String> The name which be used to refer to this aggregation.

Method Summary

Returns Name Description
String_type()The type of ejs object. For internal use only.
Objectagg(agg)Add a nesated aggregation. This method can be called multiple times in order to set multiple nested aggregations what will be executed at the same time as the parent aggregation. Alias for the aggregation method.
Objectaggregation(agg)Add a nesated aggregation. This method can be called multiple times in order to set multiple nested aggregations what will be executed at the same time as the parent aggregation.
Objectfield(field)Sets the geo field to perform calculations from.
Objectprecision(p)Sets the Geo Hash precision. The precision value can be between 1 and 12 where 12 is the highest precision.
ObjectshardSize(shardSize)Determines how many geohash_grid the coordinating node will request from each shard.
Objectsize(size)Sets the number of aggregation entries that will be returned.
StringtoJSON()

Retrieves the internal agg object. This is typically used by internal API functions so use with caution.


Method Detail

 _type

String _type ( )
The type of ejs object. For internal use only.

Returns
the type of object

 agg

Object agg ( agg )
Add a nesated aggregation. This method can be called multiple times in order to set multiple nested aggregations what will be executed at the same time as the parent aggregation. Alias for the aggregation method.

Parameters
agg <Aggregation> Any valid Aggregation object.
Returns
returns this so that calls can be chained.

 aggregation

Object aggregation ( agg )
Add a nesated aggregation. This method can be called multiple times in order to set multiple nested aggregations what will be executed at the same time as the parent aggregation.

Parameters
agg <Aggregation> Any valid Aggregation object.
Returns
returns this so that calls can be chained.

 field

Object field ( field )
Sets the geo field to perform calculations from.

Parameters
field <String> a valid field name.
Returns
returns this so that calls can be chained.

 precision

Object precision ( p )
Sets the Geo Hash precision. The precision value can be between 1 and 12 where 12 is the highest precision.

Parameters
p <Integer> The precision. Integer between 1 and 12.
Returns
returns this so that calls can be chained.

 shardSize

Object shardSize ( shardSize )
Determines how many geohash_grid the coordinating node will request from each shard.

Parameters
shardSize <Integer> The numer of geohash_grid to fetch from each shard.
Returns
returns this so that calls can be chained.

 size

Object size ( size )
Sets the number of aggregation entries that will be returned.

Parameters
size <Integer> The numer of aggregation entries to be returned.
Returns
returns this so that calls can be chained.

 toJSON

String toJSON ( )

Retrieves the internal agg object. This is typically used by internal API functions so use with caution.


Returns
returns this object's internal object.

Request

Queries

Filters

Aggregations

Facets

Suggesters

Geo