Hi!

I'm trying to make a clustering of geo-points and got stuck with a two 
problems.

1. If bucket contains only one document, is there any way to get it's id?
2. Is there any way to get only aggregated data from ES with out of a 
'hits' information? It is really a lot of unnecessary data there.

ES version: 1.1.1

Query example:
 

>             {
>                 "size": 1000,
>                 "aggregations": {
>                     'cells': {
>                         'geohash_grid': {
>                             'field': 'point',
>                             'precision': precision,
>                         },
>                         'aggregations': {
>                             'lat': {
>                                 'avg': {
>                                     'script': '''doc['point'].lat''',
>                                 }
>                             },
>                             'lon': {
>                                 'avg': {
>                                     'script': '''doc['point'].lon''',
>                                 }
>                             }
>                         }
>                     }
>                 },
>                 'query': {
>                     'constant_score': {
>                         'filter': {
>                             'exists': {
>                                 'field': 'point',
>                             }
>                         }
>                     }
>                 }
>             }

-- 
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 elasticsearch+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/408a5cb8-9eaa-4f49-a448-ae790722d4e5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to