Nest 5.0.0 with Server 5.6.1 runs correctly:
result.DebugInformation shows a valid response JSON
and a C# POCO: WX_ORDER fills in with the response hits.hits._source data
With Nest 7.17 or Elastic.Clients.Elasticsearch 8.1.0 requesting an Elastic 8.7.1 server
however unexpectedly: 1) same query returns same hits.hits._source
2) but it fails to deserialize it into an application POCO object.
ar sr = new SearchRequest<T>();
sr.Query = tq;
var startIdx = (_pageNo - 1) * _pageSize; // Page Number is 1-based
sr.From = startIdx;
sr.Size = _pageSize;
sr.Sort = _sortBy;
var result = _client.Search<T>(sr);
_log.Debug(result.DebugInformation);
_s.Total = result.Total;
_s.Page = _pageNo;
_s.Results = result.Documents;
result.Documents contains a valid count(1) but each element is an instance of WX_DOCUMENT created by a default constructor.