Son Do
Jul 26, 2018
(3 votes)

Sorting issue in Episerver Find 13.0.1

We have known an issue about sorting in Find 13.0.1 that we can reproduce

  • Create a developer index in
  • Create some properties for string, DateTime, int type for a page type
  • Create some page using those page types.
  • Run the site and index the content.
  • In the test page, create query and sort by Date or SortNumber.
var query = _searchClient.Search<BasePage>()
    .OrderBy(x => x.MyOwnDate)
    .Select(x => new SearchItem
        PageTitle = x.Name,
MyOwnDate = x.MyOwnDate, SortNumber = x.SortNumber, TeaserText = x.TeaserText, ID = x.ContentLink.ID }) .Take(100); model.SearchResults = query.GetResult().Hits.Select(x => x.Document).ToList();

And the bug is published and will be fixed in next version.

While waiting for upgrading to the next version, we can have a way of working around:

.OrderBy(x => x.MyOwnDate, null, null, false);
// Or
.OrderBy(x => x.MyOwnDate, null, SortOrder.Ascending, false);
// For order descending, we had:
.OrderBy(x => x.MyOwnDate, null, SortOrder.Descending, false);

We need to change OrderBy clause and make sure that the ignoreUnmapped parameter is false.

We can apply the same working around for other types: date, int, ...

Hope this helps your work.

/Son Do

Jul 26, 2018


Kane Made It
Kane Made It Jul 26, 2018 10:55 AM

Great, thanks! I received several questions from partner yesterday. Not sure if we have official location to create a bug or request from user. She created a thread on World only.

Son Do
Son Do Jul 26, 2018 03:28 PM

Hi Khanh, World forum is a place that we can discuss and post bug. Currently, we don't have another channel for developers do that.

ngoanmai Aug 31, 2018 07:48 AM

Thank @Khanh for helping with this question!

Hi @SonDo, I tried following your instruction but it still does not work.

I have the ArticlePage with [ArticleDate] which is my custom field. Trying to make the very simple search query with the sorting(tried both Assending and Dessending) but the result was not sorted. 

Please see the attached image for more detail(

The field definition:

public virtual DateTime ArticleDate { get; set; }

And the search query with the sorting:

var articles1 = _searchClient.Search(Language.English)
.OrderBy(a => a.ArticleDate, null, SortOrder.Ascending, false)

var dates = articles1.Select(x => x.ArticleDate);

Do you have any suggestion for it?

Thanks so much :).

Son Do
Son Do Sep 25, 2018 04:34 AM

Hi Ngoan, 

Sorry for the late comment. I tried your search query in my Alloy site and it worked properly.

I'm not sure what happens to your site or your search query. Have you got more information that I can trace the issue?

/Son Do

Son Do
Son Do Sep 25, 2018 04:38 AM

Hi Ngoan, 

Sorry for the late comment. I tried your search query in my Alloy site and it worked properly.

I'm not sure what happens to your site or your search query. Have you got more information that I can trace the issue?

/Son Do

Sheider Oct 5, 2018 03:35 AM

Hey thanks for this! One thing I noticed after upgrading to 13.0.3 I was still seeing this issue. However it was bizzare because I would not see this behavior on my local solution with a find development index but this issue came to light on the development environment with the clients purchased development find license. I have since added this fix and all works as it should now, but it may be worth investigating on 13.0.3 as well.

Christian Simpson
Christian Simpson Oct 23, 2018 11:22 PM


I am seeing the exact same behavior that Sean mentioned. On all 13.0.x versions of Find (including 13.0.3 where the issue was supposedly fixed), I only see this sorting bug on indices which are provisioned as part of a customer's DxC license ( I do not see this behavior with indices created on (

That being said, this workaround seems to work on all 13.0.x versions of Find for indices which are provided by DxC. Thank you for the valuable info!

Thorbjørn Nielsen
Thorbjørn Nielsen Dec 3, 2018 01:40 PM


We still having the same problem with Find after getting a new find index on

I dont get the same behovior on locally.

I hade to use the same workaround to make it work.

Torbjörn Hansson
Torbjörn Hansson Dec 20, 2018 12:36 PM

I have the same issue when sorting on nested objects with Find 13.0.5 on DXC environment. Working on demo index. The result seem to be sorted but in different fragments.

Dave Johnson
Dave Johnson Jan 18, 2019 02:35 PM

Hi @SonDo

We are having the same sorting issue with production indexes located on

Using a dev index on with the same content and Nuget package version (13.0.1) seems to work absolutely fine.

Is this a an index-side code issue rather than related to the client-side library?

The bug report linked to from this post doesn't have a fix version associated with it, so has it been fixed or not? -


Please login to comment.
Latest blogs
Optimizely SendGrid SMTP host is deprecated

SendGrid is a services for sending email that is included in Optimizely DXP. Previously was the recommended SMTP server to use,...

Tomas Hensrud Gulla | Dec 4, 2022 | Syndicated blog

Hosting Optimizely CMS 12 on Docker Engine

Since Optimizely CMS can now be deployed as a Docker container, here is a demonstration of building, running and scaling an Optimizely CMS 12 site ...

Stefan Holm Olsen | Dec 4, 2022 | Syndicated blog

How to use CacheTagHelper with content areas in Optimizely CMS 12

I might be going out on a limb here - if you have a better solution, feel very free to share it!  Upgrading your Optimizely web application from .N...

Andreas J | Dec 2, 2022

The 1001st Piece in your 1000 Piece Puzzle: .NET Default Interface Functions

I was recently working with a client who wanted a reasonably large subsystem added to Optimizely that would add automated management to their...

Greg J | Nov 28, 2022 | Syndicated blog