I am trying to limit my search results to a specific site collection, but it is NOT working.

I have the following configuration:

1- Root site collection

2- /sites/teamsitecollection

3- /sites/teamsitecollection/searchcenter

Basically I am trying to configure search center to NOT display any results from the Root Site collection when a user queries from from /sites/teamsitecollection.

what i did.

  1. Configured the search settings /sites/teamsitecollection to point to the following results page: /sites/teamsitecollection/SearchCenter/results.aspx.

  2. On the /sites/teamsitecollection configured a RESULT SOURCE with the following query transform: {searchTerms} Path={SiteCollection.URL}*

However this configuration continues to display results from the root site collection. any ideas?

1 Answer 1


I am facing the same issue. I just made it work with a workaround by specifying the site collection URL as a part of the query. This is not a generic approach that will work for all the site collection but as per my requirement, it works.

Solution: Specify the "Append Text To Query" of the core results webpart Path:"*/sites/teamsitecollection"

'*' is used so it can work in different environments like dev > stage >prod

Ref: MSDN Blog

Hope this helps.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.