Sort() function not working on string fields of the document. this is my query:
(I use the latest version of Nest client in c# dotnet 5)
var res = await elasticClient.SearchAsync<CustomerModel>(s => s.Index("customers").From(from)
.Size(filter.PageSize)
.Query(q => q
.Bool(b => b
.Filter(
sh => sh.Match(m => m.Field(f => f.PartyContracts.Any(a => a.Contract.Any(a => a.ContractTypeId == 1)))),
.Sort(q => q.Ascending(f => f.cache_FirstName))
);
it doesn't give me the result but when commenting on the sort line it will be fixed.
what is the problem?