sort search result with different property for different page type.

Vote:
 

Hi,

Could some help me?

I have a below requirement from client

PageType Article

{

DateTime Created;

DateTieme Update;

}

PageType Product

{

DateTime Created;

DateTieme Update;

}

We have requirement to sort the search result in following way.

when sorting is by latest, it would sort by page's updated date,

Except: Product pages, those should show in created date order.

Thanks,

Mahesh Kulkarni

#222358
May 04, 2020 9:40
Vote:
 

Create a new property SortDate, and sort by that date?

In product page:

public DateTime SortDate => Created;

In other pages:

public DateTime SortDate => Update;
#222363
Edited, May 04, 2020 11:10
* 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.