Forum Discussion
pnp Modern Search - People - Search Source Scope
Hi everyone,
I'm looking for some advice from anyone that has experience of the SharePoint 'pnp Modern Search' (v4) tool.
We have a requirement to build a people search which does not search across the tenant 'GAL', but instead would search to a more localised scope, for example a SharePoint list within the scope of the site hosting the pnp Modern Search page.
I had a look at the documentation (Create a useful People Search - PnP Modern Search (v4) (microsoft-search.github.io)) and in the section 'Configure Search Results' there is mention of a 'Result Source ID' which appears to be where the scope is defined. Unfortunately I can't find more detail than this in the documentation, IE to specify what other sources would be acceptable and if these include a local SharePoint list.
I would like to try and determine the answer for this before configuring and deploying only to find the required functionality is not available.
Thanks very much for your help!
Hi there,
You can limit the Search scope by including the path in the Query template in the Search Results webpart. For example, to limit to a specific List:
{SearchTerms}-Path:"https://xxxxxx.sharepoint.com/sites/xxx/lists/listname"
Does that help?