Question: How do you order by Date in Elasticsearch Nest C# API.
Login to See the Rest of the Answer
Answer: See the code below
var response = await _elasticClient.SearchAsync<MyIndex>
(
s => s.Query(q => q.QueryString(d => d.Query("Technology")))
.Sort(a => a.Descending(b => b.DateInserted))
.From((page - 1) * pageSize)
.Size(pageSize));