Modern Search - Provide option to change scope from local to global
Current modern search in communication/modern team site defaults to local scope and search results are from the current site. Users has to click on the SharePoint link from breadcrumb in order to expand the search scope across sites.
Most of our customers prefer to search on the broader scope rather than searching on the current site, esply. for the Communication sites.
Thanks for your feedback! We’re happy to report that your suggestion has been released. See following blog post for more details on the capability – https://techcommunity.microsoft.com/t5/sharepoint/configure-modern-search-results-to-search-all-of-your/m-p/447334
Easiest way to control this setting is to use PnP PowerShell as shown within the example 6 in following page – https://docs.microsoft.com/en-us/powershell/module/sharepoint-pnp/set-pnpsearchsettings?view=sharepoint-ps
42 commentsComments are closed
@Clayton we are aware of the issue with the placeholder text and we're working to improve on the overall page lifecycle on what loads when/where, to ensure all aspects of a site work as intended.
This is DESPERATELY needed. You should be able to configure the scope of the search through the front end config.
This is another example of how limited sharepoint modern experience actually is when you attempt to apply to an organisation that doesnt fit with Microsoft's view that all companies are the same. In the real world, most companies have some complexities and using the modern experience out of the box results in numerous UX issues, search being a major issue.
The default 'search all sites in the hub' simply doesnt work a lot of the time unless your site structure and scope is exactly the same as how Microsoft envisaged.
I have noticed there is a 5 second delay before users can start searching.
If I click on the home navigation link for our Intranet the search box text shows 'Search' , then after 5 seconds the search box text changes to 'Search across sites'. If the search box text shows 'Search' then search doesn't work.
I can keep reproducing this issue by clicking on the navigation link to reload the page. Every reload - the search box takes 5 seconds for the search text to change to 'Search across sites'.
This also causes an issue when using staff search via the following URL '/sites/Intranet/_layouts/15/search.aspx/people' - for example, if a user opens our home page, clicks Staff Search (before the search text changes) which navigates users to this URL - search never works - not even after 5 seconds. If they click the Staff Search link after the 5 seconds and the search text has changed to 'Search across sites' then search will work.
BTW, this 5 second delay is for all sites in our Tenant - connected to hub or not and I have also tested in other tenants.
The scenario of hub scope + people vertical makes a lot of sense and we will take a look at that internally when planning the vertical configuration.
And I would probably go PnP web parts over classic ones, just because they are SPFx and will work on modern pages.
Matthias Habegger commented
It would be great if it would be possible to set the search scope for home-sites to hub-site AND People.
Full custom layout - search box, search results (custom rendering), refiners - pretty much the PnP Search Web parts. The HCWP is great but I feel it is more for a specific use - hard coding search filters and can't change rendering - no refiners - no search box.
I am looking at a large SharePoint EDMS - do you recommend PnP Search Web parts for production use or classic Search Web Parts ?
Many thanks again - much appreciated.
Matthias Habegger commented
The search scope for home sites should also be configurable back to hub-site-wide
E.g. We have an intranet with a hub site and multiple associated sites. Now we wonna make the hub site to our home site but the search scope should still be only our intranet.
It would also be great if we would be able to configure which content should be found by default.
E.g. search content of our hub-site + associated sites + people
I wouldn't say PnP Modern Search is without support as we fix bugs quite rapidly - and can release quicker than OOB ;) But it's not official support with a guarantee, that is correct.
Is your scenario a better highlighted content web part, require modification to the OOB search page in terms of item rendering and vertical config, or do you need a fully custom layout page with search box and everything.
I don't have any particular roadmap to share here, outside of that it comes up at regular intervals as a discussion point - and is being evaluated.
Any serious document management system will heavily utilise search/ metadata to provide a better end user experience. Modern currently doesn't provide flexibility in web part configurations. The Microsoft PnP search web parts provide most of the functionality that is required but they seem to be quite buggy and they come with no support.
Are you looking to release these as out-of-the-box web parts into the SharePoint platform at any stage?
If not, what is your direction in this area -search web parts customisations ?
Thanks again Mikael, the information you are providing here is invaluable and keeping us all updated with what is going on.
Search scope and with hub works for all search boxes, not just the header one. We're working to document all of this as well.
Mikael, can you please confirm.
I am a Targeted Release user so I have the search box in the navigation header - so web.SearchScope to Hub will work.
What about all my other users who are Standard and don't have the search box in the navigation header - with the Hub scope still work ?
If not, when will you be releasing the search box into the header for Standard users ?
The option to set web.SearchScope to Hub is now rolled out 100%.
Alberto, you can already to that from the site search page, and we will be adding a scope control to the search box going forward.
Alberto Suarez commented
I think search should be configurable to let user search in site, any site in hub or global
morten: Global, or all sites, is already in place and you can set that using PowerShell. Hub scope is coming - as long as you're on a tenant which has the search box in the navigation header. And that roll out will hopefully finish in not too long.
Our company intranet (7.000 users) consists of a SharePoint Communication site in a hub site structure with several Communication sites under it. This means that our users sees it as one coherent Intranet site and that our users expect search to function as a global search - that searches in all sites. - No one uses the breadcrump - we really really need a global search function
Search box is still 10% in prod, and is needed for the SearchScope setting. We are closing in on continuing the roll out with an improved experience. We also have progress on the Hub scope setting, and I'll report as soon as I know more on dates.
Max Goss commented
Sounds good, I think consistent hub scoping will be a good solution for many orgs.
Can I just ask, has the roll out of the search box in the header been completed? I ask because some members of my org who are not on first release still see the traditional search box (even on modern sites) Assuming this is something that needs to be resolved first before the search scope changes will work?
Hub scope is coming, trust me - and sorry for the delay. And for the hub itself it already works, just not for associated sites.
I would probably refrain from going all custom until we fix this bug - but yes it's an option.