I have recently upgraded ES from 1.7.4 to 6.3.2. After upgrading the distance calculation between the given point and geopoints in ES are showing different results.
For example, in 1.7.4, distance between 2 geo points were say 2.1kms
However, in 6.3.2, it is showing 1.9kms
The 1.7.4 query script is as follows:
in 6.3.2, the script used is:
"source": "doc['distributer.geolocation'].arcDistance(params.lat,params.lon) * .001"
(.001 is to convert meter to km)