[edit] Narrowing the diagnostic: searchs results are incorrect wen call from communication sites [/edit]

I'm working with SharePoint Online and I'm facing an issue regarding search results.

I have two site collections. Let's say /sites/A and /sites/B

Using the Search Query Tool (, I put this search : path:"https://mytenant.sharepoint.com/sites/A

Running this query against /sites/A works. Same query against /sites/B does not.

However, (and it's puzzling me), the other direction works. Search for path:"https://mytenant.sharepoint.com/sites/B works against the two collections.

What can explain this behavior?

If it matters, here's the higher picture : we have a site hub (which is /A in my case) and a bunch of sites collections (/B) joined to the hub. All of theses sites are modern team sites. The hub site is a communication site. Each site have a unique "metadata" item in a specific list. Then I want to search for these items using the modern search web parts from the hub site.

  • Do you have any Search Settings, like query rules or others configurations that differ between the sites? You can export the config and compare to see. Mar 28, 2019 at 15:44
  • @MatthewMcDermott: as I said I'm testing from Search Query Tool. Unless i'm wrong the SQT doesn't use rules? That said, I don't have customization of rules
    – Steve B
    Mar 28, 2019 at 16:03
  • I narrowed the diagnostic. The issue occurs on all communication sites, never on team sites. Observed on two different tenants
    – Steve B
    Mar 29, 2019 at 13:43
  • I would just specify the tenant root or the tenant Enterprise Search Center /search/ for your API calls. Then you can control the outcome. Mar 29, 2019 at 17:17
  • @MatthewMcDermott: even if it works, I won't be able to solve my actual problem which is to use the modern search webparts. These components are executing the search onto the current site.
    – Steve B
    Mar 31, 2019 at 21:24

1 Answer 1


There is a setting, to change the search scope while searching on a modern site. But, this doesn't work trough the REST API it seems.

See also: https://techcommunity.microsoft.com/t5/SharePoint/Configure-modern-search-results-to-search-all-of-your/m-p/447334/highlight/false#M29047

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.