November Happy Hour will be moved to Thursday December 5th.

UnifiedSearch Best Bet after OrderBy SearchUpdateDate

Vote:
 

Hi!

I am adding a order function in a customers existing search.
They still want to have Best Bets at the top of the page. But when using OrderBy in the result, the Best Bet hits get ordered according på update date.

Is it possible to order by date, but still keep BestBet at the top?

The customer are using EpiServer.Find 13.5 with Episerver CMS 11.20


Best Regards
Niklas Grushult

#296945
Edited, Feb 21, 2023 14:06
Vote:
 

Hi Niklas

Content matching best bets are boosted on relevance score so when ordering by date you will be ignoring the relevance score.
You could let update date influence relevance score with .UsingAutoBoost()

If you're using UnifiedSearch you should be able to check what results are best bets (UnifiedSearchHit.IsBestBet). You could rearrange the results after they are returned based on this.

#299496
Apr 04, 2023 6:50
* 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.