I want to get sort by distance response from elastic search but I have unmapped longitude and latitude values in elastic search hence I am not getting any result using below query.
How can i get "ignore_unmapped":"true"
in sort like below query
I have tried using GeoDistanceSortBuilder and there is no method to set ignore_unmapped. I cannot find any other class to build sort query
{
geoSort = geoDistanceSort(LOCATION_POINT_HOLDER, 0, 0).unit(DistanceUnit.KILOMETERS).order(SortOrder.DESC);
}
"type": "illegal_argument_exception", "reason": "failed to find mapper for [location] for geo distance based sort"
I am getting this error without setting ignore_unmapped:true.