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 'https://microsoft-search.github.io/pnp-modern-search/.
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 (https://microsoft-search.github.io/pnp-modern-search/scenarios/Create-a-useful-People-Search/) and in the section 'https://microsoft-search.github.io/pnp-modern-search/scenarios/Create-a-useful-People-Search/#configure-search-results 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!
2 Replies
- KasperLarsenIron Contributor
The Result Source ID used for people search in SharePoint search is the LocalPeopleResult.
And it doesn't really make sense to limit people search to a site, those two concepts doesn't belong together. Think of people search as an extended phone book, so you would limit by where people live, job title and similar.
Behold the covers SharePoint people are using the User Profile properties, which you can access from the SharePoint Admin center
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?