SharePoint 2013 How to exclude specific pages from search results

Hi all,

Just want to share you a tip on how to exclude certain pages from your search results. e.g. test or obsolete pages that have been published but you want it to be hidden.

The answer is to use a query rule.

1. Go to Site Settings -> Search Query Rules
2. Select the Result Source that you use, and add New Query Rule
3. Give it a name, and Remove Condition so the rule applies to all queries
4. click Change ranked results by changing the query. Again choose the appropriate source and here you can add filter on the properties. in my case I use the page Title:

{searchTerms} -Title:"my page test" -Title:"Obsolete page to be hidden"

5. You can then test your queries for immediate change. Your changes will appear after a few seconds as SharePoint has suggested.

HTH,
Andreas

Comments

Popular posts from this blog

SharePoint 2013 anonymous access add attachments to list item

Sitecore custom publish agent from specific node and at a specific time

CRM Plugin - Parent and Child Pipeline