Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more

Son Do
Jul 26, 2018
  1228
(0 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 find.episerver.com.
  • 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>()
    .FilterForVisitor()
    .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 https://world.episerver.com/support/Bug-list/bug/FIND-3596 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

Comments

Please login to comment.
Latest blogs
Optimizely Configured Commerce and Spire CMS - Figuring out Handlers

I recently entered the world of Optimizely Configured Commerce and Spire CMS. Intriguing, interesting and challenging at the same time, especially...

Ritu Madan | Mar 12, 2025

Another console app for calling the Optimizely CMS REST API

Introducing a Spectre.Console.Cli app for exploring an Optimizely SaaS CMS instance and to source code control definitions.

Johan Kronberg | Mar 11, 2025 |

Extending UrlResolver to Generate Lowercase Links in Optimizely CMS 12

When working with Optimizely CMS 12, URL consistency is crucial for SEO and usability. By default, Optimizely does not enforce lowercase URLs, whic...

Santiago Morla | Mar 7, 2025 |

Optimizing Experiences with Optimizely: Custom Audience Criteria for Mobile Visitors

In today’s mobile-first world, delivering personalized experiences to visitors using mobile devices is crucial for maximizing engagement and...

Nenad Nicevski | Mar 5, 2025 |

Unable to view Optimizely Forms submissions when some values are too long

I discovered a form where the form submissions could not be viewed in the Optimizely UI, only downloaded. Learn how to fix the issue.

Tomas Hensrud Gulla | Mar 4, 2025 |

CMS 12 DXP Migrations - Time Zones

When it comes to migrating a project from CMS 11 and .NET Framework on the DXP to CMS 12 and .NET Core one thing you need to be aware of is the...

Scott Reed | Mar 4, 2025