Removing Multiple Site Collections from Search Results in SharePoint Online

I recently blogged about a scenario that my customer was having whereby they needed to temporarily prevent a Site Collection from appearing in search results within SharePoint Online and I documented a solution that used a search query rule - https://blogs.technet.microsoft.com/fromthefield/2016/07/20/2095

My customer has been playing around with this and ran into some unexpected behaviour - in short if you have multiple sites that you'd like to omit from search results, consolidate these into a single query rule rather than creating a separate query rule for each to prevent inconsistent search results.

In my example below, I have omitted results for both the HR and Finance Site Collections using the "OR" operator.

 

QueryRuleMultipleSites

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Brendan Griffin - @brendankarl