Try our conversational search powered by Generative AI!

The sorting functionality does not work correctly in Episerver find version 13.0.1.0

Vote:
 

Hi,

The sorting functionality in Episerver find 13.0.1.0 still works well with the properties which are defined in the Episerver dll (like the properties of EPiServer.Core.PageData) not not for the additional properties which are defined in our code. 

Example: I declared the ArticlePage which is the page type with some properties like Order(int), Heading(string) and ArticleDate(DateTime).

 [SiteContentType(
GroupName = Global.GroupNames.News,
GUID = "AEECADF2-3E89-4117-ADEB-F8D43565D2F4")]
[SiteImageUrl(Global.StaticGraphicsFolderPath + "page-type-thumbnail-article.png")]
public class ArticlePage : PageData
{
public virtual int Order { get; set; }
public virtual string Heading { get; set; }
public virtual DateTime ArticleDate { get; set; }
}

Then, the very simple query search with sorting like:

 _searchClient.Search().ThenByDescending(x => x.ArticleDate).GetContentResult(); 

(With _searchClient is EPiServer.Find.IClient)

It does nothing with sorting. The same issue when trying with remaining properties I defined in ArticlePage( Order and Heading). 

I tried changing the sorting field to "Name" or "StartPublish" which are defined in Episerver.Core.PageData, It works.

Note that I tried it in the Alloy template (11.9.1.0) without any special configuration about Episerver Find.

This crazy issue happens with the Episerver Find v13.0.1.0 only, I tried changing to use the Epi Find version 12.7.1.0 and It works well. 

Is there any one getting the same issue like that?

#195411
Jul 24, 2018 11:12
Vote:
 

Please see this blog post by the legendary Son Do https://world.episerver.com/blogs/Son-Do/Dates/2018/7/sorting-issue-in-episerver-find-13-0-1/

#195513
Jul 27, 2018 4:43
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.