Issue with GeoUtils.planeDistance

We are migrating from ES 2.0 to 5.0

My existing SortBuilder is as below,

SortBuilder sort = SortBuilders..geoDistanceSort("address.plocation",Double.valueOf(modParams.get(P_LAT)),Double.valueOf(modParams.get(P_LON))).unit(DistanceUnit.MILES).order(SortOrder.ASC).geoDistance(GeoDistance.PLANE);

AS GeoDistance.PLANE is deprecated, I also see from some forums/blogs that we should be using planeDistance(double lat1,double lon1, double lat2, double lon2) instead of GeoDistance.PLANE

Any example/suggestion on how/where to implement this will be helpful.

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