Hi,
I have a problem with sorting my search results. Below you have two types of searching:
Using Unified search:
var unifiedSearch = searchClient.UnifiedSearch() .For(model.Query) .OrderBy(x => x.SearchPublishDate) .GetResult();
Using Search:
var typeSearch = searchClient.Search<SearchViewModel>() .For(model.Query) .OrderBy(x => x.PublishDate). IncludeType<SearchViewModel, SitePageData>(x => new SearchViewModel { Name = x.Name, PublishDate = x.StartPublish }).GetResult();
In unified search everything works fine. My results are sorted by SearchPublishDate as expected. The problem is in the second query. It returns the same results as the first one but the order is different. It seems to be ordered by score instead of PublishDate. Any sugestions what am I doing wrong?