Search Result Source not returning docs on Subsite

Rene Wagner 156 Reputation points


This is for SharePoint 2016 on-prem ... I have created a Search Result Source in Central Admin that defines the following query:

{searchboxquery?} IsDocument:1 AND PATH:{Site.URL}

I then created a page on site collection and added a Search Result Web Part that uses the above Search Result Source as its query. When I run a search I get results, but only for the top-level site collection ... I also have a subsite under that site collection for which I am not getting any results back.

My understanding is that the above query SHOULD return any document where the path "contains" the current site URL (i.e. if running on a top-level site in the site collection, any subsite documents should also be returned, correct?

I verified that the sub site documents are indexed because I can find them via the global search center ...

Any idea why the subsite docs would not get returned when searching from the top-level site?


SharePoint Server
SharePoint Server
A family of Microsoft on-premises document management and storage systems.
2,293 questions
0 comments No comments
{count} votes

Accepted answer
  1. JoyZ 18,056 Reputation points

    @Rene Wagner ,

    Per my test, {searchboxquery} IsDocument:1 AND PATH:{Site.URL} will include documents in subsite, as shown below:


    Please edit the search result web aprt>change query>click Test tab>Show more>enter the file name in search query box to check if the result will be displayed(Note, since I use the duplicate file, remember to change settings to "Don't remove duplicates").



    If an Answer is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

0 additional answers

Sort by: Most helpful