SOLVED

Site Search: Limiting to Set of Document Libraries

Copper Contributor

Within site administration (settings), I am looking setting up what is probably one of the types of search web parts in a page that limit the search to a set of apps, namely several document libraries. What would you do in creating this?

 

I want to use SharePoint features that are not extended to building something like an HTML form page (contained in SharePoint chrome) and using JavaScript and REST requests to look at the various doc libs & their metadata.

2 Replies
best response confirmed by StevePenner (Copper Contributor)
Solution

@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. 

@StevePenner ,

 

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.

1 best response

Accepted Solutions
best response confirmed by StevePenner (Copper Contributor)
Solution

@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. 

View solution in original post