May 19 2022 02:25 AM
Good Morning:
I am looking to create a Knowledge base type of site, where the search only brings results from that KB Site.
Be it using the Pnp Search tools, or the normal search box at the top of the site, how can i limit the search? i tried a few things, but so far, i alway get results from all the sites I am a member.
thank you
May 19 2022 05:45 AM
SolutionHello @MVCuser
when you use the PnP Modern Search Web Parts https://microsoft-search.github.io/pnp-modern-search/ you can define the Path:"" into your query.
Like:
Path:"https://TENANT.sharepoint.com/sites/MSTEvents/"
This query show's only results from the site MSFEvents.
Hope this helps.
Regards, Dave
May 19 2022 06:09 AM
May 19 2022 06:33 AM
Hello @MVCuser
yes, i think you need to configure managed properties:
https://microsoft-search.github.io/pnp-modern-search/scenarios/set-up-managed-properties/
Please attention, this can takes several hours.
And then you can configure your filters:
https://microsoft-search.github.io/pnp-modern-search/scenarios/page-with-filters/
Happy search ;)
Regards, Dave
May 19 2022 06:37 AM
May 19 2022 06:43 AM
Hello @MVCuser
you're welcome ;)
Have you add content to your columns? Map your properties to default RefinableStringXX .
So as last you can try to reindex your site or library:
https://docs.microsoft.com/en-us/sharepoint/crawl-site-content
Regards, Dave
May 20 2022 12:31 AM
May 19 2022 05:45 AM
SolutionHello @MVCuser
when you use the PnP Modern Search Web Parts https://microsoft-search.github.io/pnp-modern-search/ you can define the Path:"" into your query.
Like:
Path:"https://TENANT.sharepoint.com/sites/MSTEvents/"
This query show's only results from the site MSFEvents.
Hope this helps.
Regards, Dave