Closed
Description
Elastic.Clients.Elasticsearch version: 8.0.0-beta.6
Description of the problem including expected versus actual behavior:
I'm migrating (well, trying) one of our smallest APIs to 8.x.
In one of our calls we're sorting on distance from a point.
I've managed to get to this
.Sort(new[] { new SortCombinations(
SortOptions.GeoDistance(new GeoDistanceSort
{
Field = (Expression<Func<MyClass, object>>)(x => x.Address.Coordinates),
Order = SortOrder.Asc,
Location = new List<GeoLocation>() {new GeoLocation() /* esPostcode.Lat, esPostcode.Long */ },
DistanceType = GeoDistanceType.Arc
}))
}));
As you can see there a few problems with it.
Field
should probably just be a generic expression ofTDocument
. I've noticed this issue in other places as well.- Can't provide coords.
GeoLocation
is an empty class.
SortCombinations
should probably be singular as constructor accepts only singleSortOption
.
Expected behavior
Should be able to specify lat lon.
Should be able to specify field expression easier.
Also question going forward.
I could easily add several more tickets like this but not sure what are the expectations for this 'beta phase'.
What kind of stuff do you expect to be reported at this stage?