Vulnerability in EPiServer.Forms

Try our conversational search powered by Generative AI!

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
Join the Work Smarter Webinar: Working with the Power of Configured Commerce (B2B) Customer Segmentation December 7th

Join this webinar and learn about customer segmentation – how to best utilize it, how to use personalization to differentiate segmentation and how...

Karen McDougall | Dec 1, 2023

Getting Started with Optimizely SaaS Core and Next.js Integration: Creating Content Pages

The blog post discusses the creation of additional page types with Next.js and Optimizely SaaS Core. It provides a step-by-step guide on how to...

Francisco Quintanilla | Dec 1, 2023 | Syndicated blog

Stop Managing Humans in Your CMS

Too many times, a content management system becomes a people management system. Meaning, an organization uses the CMS to manage all the information...

Deane Barker | Nov 30, 2023

A day in the life of an Optimizely Developer - Optimizely CMS 12: The advantages and considerations when exploring an upgrade

GRAHAM CARR - LEAD .NET DEVELOPER, 28 Nov 2023 In 2022, Optimizely released CMS 12 as part of its ongoing evolution of the platform to help provide...

Graham Carr | Nov 28, 2023