Try our conversational search powered by Generative AI!

Search results return only pages


I have search implemented on my 7.5 site. It works except that it returns anything with the search terms - pages and blocks. I need it to only return pages. How can I set that up to return pages that either have search terms in their direct content or any blocks on that page?


Sep 01, 2015 17:22

Hi, Nathan,

Are you using built-in search and the implementation from AlloyTech templates?

If so, built-in search searches the content types you set in QueryExpressions for Lucene and under search roots you specify. However, even if you do this, you will get into trouble with multiple pages (if you have a page and a block on it with the same keyword, you would get the page twice in the search results).

So, the best approach we have been using so far is Jeroen's In his first, you can read more about the approach, too:

In brief, the blocks aren't searched for, their searchable content is saved to the belonging page(s).

Hope that helps,


Sep 02, 2015 9:03
* 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.