Try our conversational search powered by Generative AI!

The sorting functionality does not work correctly in Episerver find version



The sorting functionality in Episerver find 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).

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 ( 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 and It works well. 

Is there any one getting the same issue like that?

Jul 24, 2018 11:12

Please see this blog post by the legendary Son Do

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.