Elastic.Clients.Elasticsearch version: 8.1.7
.NET runtime version: .NET 9
Description of the problem including expected versus actual behavior:
I have a generic method and I pass in a SortOptionsDescriptor. When chaining multiple fields, sort is only occurring on the last field.
Steps to reproduce:
var defaultSort = new SortOptionsDescriptor<SearchWindowElasticSearchModel>().Field(a => a.Test, fs => fs.Order(SortOrder.Asc)).Field(a => a.Name, fs => fs.Order(SortOrder.Asc)).Field(a => a.SortOrder, fs => fs.Order(SortOrder.Asc)).Field(a => a.LastName, fs => fs.Order(SortOrder.Asc));
Expected behavior
I'd expect my search to be sorted by Test, Name, SortOrder, and then LastName.
What's occuring is my search is only sorting by LastName