Hello all,
I'm using GeoDistance Aggregation on a nested field so it is wrapped around a nested aggregation. This query is being run ES 1.6.0 and encountering an exception which I'm unable to solve. Please also take a look at the query if it is the right way to use GeoDistance Aggregation.
Query:
{
"aggs": {
"nested_geodistance": {
"nested": {
"path": "addresses"
},
"aggs": {
"per_ring": {
"geo_distance": {
"field": "addresses.location",
"unit": "km",
"orgin": {
"lat": 56.78,
"lon": -12.34
},
"ranges": [
{
"from": 100,
"to": 200
}
]
}
}
}
}
}
}
After executing this query I'm getting below exception:
Parse Failure [Unexpected token START_OBJECT in [per_ring].]]; }{[F8SeZ5RjR_KpSnvWBOSg7w][prod-contacts-0][4]: RemoteTransportException
I have revisited my query multiple times but unable to figure out what's wrong with my aggregation name.
Please let me know if further information is needed.
Thanks,
Ayush