Calculate minimum distance in a scriptField

(Benoit Bruynbroeck) #1


I have a field called 'lieux' which have multiple GeoPoint.
I want to write a scriptField to calculate the minimum distance between a point and 'lieux' field.

But I didn't find how I can solve this problem ?
If I iterate on my lieux field, the array returned is not a GeoDistance object anymore so I can't use arcDistance.
I tried to use org.elasticsearch... Distance but it doesn't work as well..

Could someone help me ?

Thanks in advance !

(Isabel Drost-Fromm) #2

Would you mind posting a minimal set of documents and the query you have so far so it's easier to reproduce your problem?

(system) #3

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