It doesn't work. I succeeded using a script but it's slow. Any idea how to do that?
My current workaround is to also have a lat and lng field as double in my index. But it doesn't make sense to double the info.
I guess you can use the geo_centroid aggregation as the latitude of the centroid should be equivalent to the latitude average. Of course you will be doing a bit more work as you are computing the average of the longitude too.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.