GeoPoint Script Processing

I wanted to use script term aggregation to process array of Geo point locations using arcDistance function in painless. But it seems like the arcDistance function always takes the first (lat,lon) location to do distance measurement. is there any way to access the rest of the locations in the array of geopoints..


This issue is tracked in

Ok thanks! I did not realize this is a limitation on elastic search part. Is there a work around aside from implementing custom location distance function?

Storing one point per field, implementing it as custom native script plugin, or the workaround at the end of the issue is pretty much all I can think of at the moment. However, fixing this issue in elasticsearch is pretty high on my priority list.

Ok great! thanks. I will take the native script plugin route for the time being.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.