(lucene on sitecore 8.2)

I have a tabbed search results page with 5 tabs:

  • people
  • insights
  • news
  • services
  • other

The "other" tab should display results that do not appear in the first four queries. I was going to try to iterate through and track all the Guids that are returned in the first four queries and then use that to have a exclude in the "other" tab query but not sure how performance would be or if there is a better way.

The first four queries I am only getting the hits and then using paging to take the first 10 - if I have to iterate through all hits and add the guids to an array - I thought that might be slower and the wrong way to go but not sure how else to do it.


  • How are your first 4 queries done? Is this based on a template or is it more complex?
    – Gatogordo
    May 15, 2018 at 13:23
  • 2
    You probably need to look at a faceted query
    – Mark Cassidy
    May 15, 2018 at 13:24
  • If for some reason faceted query is not an option for you, you may try using something like (pseudocode used): otherExpression = otherExpression.And(!peopleExpression).And(!insightsExpression).And(!newsExpression).And(!servicesExpression). It really depends on your code.
    – Marek Musielak
    May 15, 2018 at 14:26
  • Thanks for the feedback I will see if I can do something similar to Marek's suggestion. The faceted query won't work because each tab is a separate query with the author able to specify the starting location in the content tree as well as what templates to include.
    – Colema18
    May 15, 2018 at 14:31


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.