How can I sort by _geo_distance in NEST for Elasticsearch? -
is possible sort _geo_distance
nest library elastic search? can't find support it.
the raw json doing want is:
"sort": [ { "_geo_distance": { "position": { "lat": 59.3389428, "lon": 18.0761637 }, "order": "asc", "unit": "m", "distance_type": "plane" } } ]
var results = client.search<object>(sd => sd .sortgeodistance(d => d .onfield("position") .unit(geounit.miles) .distancetype(geodistance.plane) .pinto(lat: 59.3389428, lon: 18.0761637) .ascending());
Comments
Post a Comment