We are experiencing alot of issues with with orderby in our results. Especially happening with Dates and strings. The order by on a property Title for example puts abdominal at the end of the list and shows adolecent as the first item. Clearly not working. Another instance is the date.
Here is the result of 7 events sorted by date
var query = this.searchClient.Search();
query = query.For(q);
var eventTypeFilter = this.searchClient.BuildFilter();
foreach (var eventType in currentPage.EventTypes.Select(x => x.ToReferenceWithoutVersion().ID))
eventTypeFilter = eventTypeFilter.Or(x => x.EventTypeIdList.Match(eventType));
query = query.Filter(eventTypeFilter);
query = query.Filter(x => x.Ancestors().Match(currentPage.ScopeOverride.ToReferenceWithoutVersion().ID.ToString()));
query = query
.Filter(x => x.EndDateTime.GreaterThan(DateTime.Now))
.OrderBy(x => x.StartDateTime)
.Skip(model.PageWeight * p)
var results = query.GetContentResult();
We are using version 188.8.131.52
Your issue looks familiar :) This is known issue FIND-3596 and will be fixed in next versions.
For your case, the working around for OrderBy clause will be
.OrderBy(x => x.StartDateTime, null, SortOrder.Descending, false)
- make sure that IgnoreUnmapped params is false.
Hope this help.