Search Result Source not returning docs on Subsite

Rene Wagner 156 Reputation points
2021-09-30T17:28:02.67+00:00

Hello,

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?

Thanks

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

Accepted answer
  1. JoyZ 18,046 Reputation points
    2021-10-01T02:57:47.43+00:00

    @Rene Wagner ,

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

    136901-image.png

    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").

    136828-image.png

    136847-image.png


    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