Constructor
new GeoDistanceAgg(field, origin, unit, rings, ringRadiusInterval)
Parameters:
Name | Type | Description |
---|---|---|
field |
string | Name of term to aggregate on. |
origin |
Array.<number> | string | Elasticsearch geo_point type. {PS: Lat, Lon if string, [Lon, Lat] if array.} |
unit |
string | Elasticsearch geo distance unit. @default 'm' |
rings |
int | Number of concentric distance rings to bucket by. |
ringRadiusInterval |
number | For each concetric ring, increase radius but this many units. |
- Source:
Extends
Methods
getName() → {string}
Get the name of the aggregation object.
- Overrides:
- Source:
Returns:
Name of aggregation. Defaults to '{{field}}GeoDistance'
- Type
- string
getName() → {string}
Get the name of the aggregation object.
- Overrides:
- Source:
Returns:
Name of aggregation. Defaults to '{{field}}GeoDistance'
- Type
- string
setName(name)
Attach a name to the aggregation object. Can be used when attaching the aggregation to a query. Convenience method to allow responsibility of the name to be given to the creator of the aggregation object. Can be accessed directly but won't show up during serialization.
Parameters:
Name | Type | Description |
---|---|---|
name |
string | Name of aggregation. |
- Overrides:
- Source: