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

Top N results per section

Vote:
 

We've categorized our pages into a number of sections and would like to return the top 3 results for each section when searching, eg;

Section 1
- Section 1 result 1
- Section 1 result 2
- Section 1 result 3
Section 2
- Section 2 result 1
- Section 2 result 2
- Section 2 result 3
Section 3 etc..

How would we go about achieving this using EPiServer find?

#89674
Aug 22, 2014 4:23
Vote:
 

Set up a query for each where you alter the the ancestors matching

query = query.Filter(x => x.Ancestors().Match(Section1.ID.ToString()));

You could then use the MultiSearch to send them all at ones to the index.

#89731
Aug 25, 2014 10:09
* 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.