A critical vulnerability was discovered in React Server Components (Next.js). Our systems remain protected but we advise to update packages to newest version. Learn More.
search
AI OnAI Off
Hi guys,
I have a page with DateTime property, "PageDate" and property "PageRank"
There is a requirement where I need to apply OrderBy for search pages which have "PageDate" in future first and ThenBy "PageRank".
Thing that complicates this is the requirement also says that editors also have an option to controll how many items can be sorted like this. There is an option for 1-3 items.
Basically something like promoted results but only with an option to choose how many items to be promoted.
I tried with getting only promoted results and than combining with normal and excluding duplicates.
Downside of this approach is duplicates in normal search results, incorrectly loaded result count and Facet count.
Also I tried with just one query and sorting by "PageDate" then by "PageRank" but then I can't controll how many items are sorted.
If anyone has any suggestion it would be really helpfull.
I'm using EPiServer.CMS version 12.15.1 and EPiServer.Find 14.2.4
Thanks,
Zoran