Here is an example: https://gist.github.com/svartalf/c3cb76c40dd4fa1374fa
I'm using two inner aggregation functions, and with "top_hits" removed, "geo_bounds" works sometimes, and sometimes fails with a `response_2.json` (in the example) or `response_3.json`. With an enabled "top_hits" aggregator it is also throwing `response_1.json` text. I'm trying to group points into the buckets and annotate them with a top_hit item and geo bounds for each bucket, and got stuck a little. Maybe I should move one of those two aggregations one level deeper? четверг, 24 июля 2014 г., 16:52:01 UTC+9 пользователь Colin Goodheart-Smithe написал: > > You should be able to achieve this with the below query. If you still > cannot get it working could you provide a cURL example which reproduces > your issue? > > curl -XGET "http://localhost:9200/geo/_search" -d' > { > "size": 0, > "aggs": { > "geohash" : { > "geohash_grid": { > "field": "location", > "precision": 3 > }, > "aggs": { > "subbounds": { > "geo_bounds": { > "field": "location" > } > } > } > } > } > }' > > On Thursday, 24 July 2014 07:46:31 UTC+1, svartalf wrote: >> >> Is there any way to use geo_bounds as a sub aggregator? >> >> I have a geohash_grid aggregation, and it will be very useful to get >> bounds for each bucket of the data. >> Right now my ES 1.3.0 says that he "Could not find aggregator type >> [bounds] in [aggregations]]". >> > -- You received this message because you are subscribed to the Google Groups "elasticsearch" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/56e9cab5-a054-4c01-a661-c05d41488ae9%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
