Forum Discussion
Site Search: Limiting to Set of Document Libraries
- Nov 03, 2020
StevePennerif you are working with modern SharePoint sites, you can use the "Highlighted Content Webpart" instead of a content search webpart, formerly known in Classic 2013 SharePoint. With these filters within you can then decide if your users can see certain site, certain libraries and so on.
Hope that helps, give a LIKE if my idea works for you. Greets, Eva.
Like Eva Vogel is saying you can use the highligted content web part (using personnalized KQL query) or if you want more control ont the result layout, you can use the PnP Search result web part: https://microsoft-search.github.io/pnp-modern-search/
Just use KQL query like: Path:"https://yourtenant.sharepoint.com/sites/siteA/LibraryA/*" OR Path:"https://yourtenant.sharepoint.com/sites/siteA/LibraryB/*" OR Path:"https://yourtenant.sharepoint.com/sites/siteB/LibraryC/*"
Etc.