Geo Distance filter with multiple lat/lon

(Deep-2) #1


My document has a geo_point field with array of lat/lon. The geoDistance filter does not seem to work with multiple lat/lon. It always considers the first lat/lon.

I want run a geo_distance filter with multiple lat/lon and sort results based on distance (nearest to furthest).

Right now I have written a groovy script that manually loops thru a array of lat/lon and calculates distance and returns a match if any lat/lon is within distance. But this approach does not seem to be correct.

Please guide.


Need help to improve performance with ES
(Christian Dahlqvist) #2

What does your data and mappings look like?

(system) #3