You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Geo distance sorting should support sort_mode options min, max and avg. I have a scenario where my documents contain a field which is a collection of geo_points, and I need to sort by either min or max distance from origin under various conditions.
I'm using
query.SortGeoDistance(s => s
.OnField(f => f.GeoLocations)
.PinTo(-84.0, 39.0)
.Unit(GeoUnit.Miles)
.Ascending());
but so far have not found a way to apply the Min or Max modes to the geo sort. Locally I've modified the SortGeoDistanceDescriptor class to add mode support which is working fine, but I wanted to check to see if I was missing something that's already there.
Is there already a way to apply sort mode to SortGeoDistance?
Thanks!
The text was updated successfully, but these errors were encountered:
@mkeperling we were hoping to receive a PR from you, but we wanted to get this in for the GA release and couldn't wait any longer. I've gone ahead and added sort_mode in the above PR #807. Thanks for bringing this to our attention!
According to the ES docs here:
http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-request-sort.html#_geo_distance_sorting
Geo distance sorting should support sort_mode options min, max and avg. I have a scenario where my documents contain a field which is a collection of geo_points, and I need to sort by either min or max distance from origin under various conditions.
I'm using
but so far have not found a way to apply the Min or Max modes to the geo sort. Locally I've modified the SortGeoDistanceDescriptor class to add mode support which is working fine, but I wanted to check to see if I was missing something that's already there.
Is there already a way to apply sort mode to SortGeoDistance?
Thanks!
The text was updated successfully, but these errors were encountered: