SOLVED

Site Search: Limiting to Set of Document Libraries

%3CLINGO-SUB%20id%3D%22lingo-sub-1849681%22%20slang%3D%22en-US%22%3ESite%20Search%3A%20Limiting%20to%20Set%20of%20Document%20Libraries%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1849681%22%20slang%3D%22en-US%22%3E%3CP%3EWithin%20site%20administration%20(settings)%2C%20I%20am%20looking%20setting%20up%20what%20is%20probably%20one%20of%20the%20types%20of%20search%20web%20parts%20in%20a%20page%20that%20limit%20the%20search%20to%20a%20set%20of%20apps%2C%20namely%20several%20document%20libraries.%20What%20would%20you%20do%20in%20creating%20this%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20want%20to%20use%20SharePoint%20features%20that%20are%20not%20extended%20to%20building%20something%20like%20an%20HTML%20form%20page%20(contained%20in%20SharePoint%20chrome)%20and%20using%20JavaScript%20and%20REST%20requests%20to%20look%20at%20the%20various%20doc%20libs%20%26amp%3B%20their%20metadata.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1849681%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EDocument%20Library%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESharePoint%20Online%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1849786%22%20slang%3D%22de-DE%22%3ESubject%3A%20Site%20Search%3A%20Limiting%20to%20Set%20of%20Document%20Libraries%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1849786%22%20slang%3D%22de-DE%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F843020%22%20target%3D%22_blank%22%3E%40StevePenner%3C%2FA%3Eif%20you%20are%20working%20with%20modern%20SharePoint%20sites%2C%20you%20can%20use%20the%20%22Highlighted%20Content%20Webpart%22%20instead%20of%20a%20content%20search%20webpart%2C%20formerly%20known%20in%20Classic%202013%20SharePoint.%20With%20these%20filters%20within%20you%20can%20then%20decide%20if%20your%20users%20can%20see%20certain%20site%2C%20certain%20libraries%20and%20so%20on.%3C%2FP%3E%3CP%3EHope%20that%20helps%2C%20give%20a%20LIKE%20if%20my%20idea%20works%20for%20you.%20Greets%2C%20Eva.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1851198%22%20slang%3D%22en-US%22%3ERe%3A%20Site%20Search%3A%20Limiting%20to%20Set%20of%20Document%20Libraries%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1851198%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F843020%22%20target%3D%22_blank%22%3E%40StevePenner%3C%2FA%3E%26nbsp%3B%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ELike%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F153902%22%20target%3D%22_blank%22%3E%40Eva%20Vogel%3C%2FA%3E%26nbsp%3Bis%20saying%20you%20can%20use%20the%20highligted%20content%20web%20part%20(using%20personnalized%20KQL%20query)%20or%20if%20you%20want%20more%20control%20ont%20the%20result%20layout%2C%20you%20can%20use%20the%20PnP%20Search%20result%20web%20part%3A%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fmicrosoft-search.github.io%2Fpnp-modern-search%2F%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fmicrosoft-search.github.io%2Fpnp-modern-search%2F%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EJust%20use%20KQL%20query%20like%3A%20Path%3A%22%3CA%20href%3D%22https%3A%2F%2Fyourtenant.sharepoint.com%2Fsites%2FsiteA%2FLibraryA%2F*%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fyourtenant.sharepoint.com%2Fsites%2FsiteA%2FLibraryA%2F*%3C%2FA%3E%22%20OR%26nbsp%3BPath%3A%22%3CA%20href%3D%22https%3A%2F%2Fyourtenant.sharepoint.com%2Fsites%2FsiteA%2FLibraryB%2F*%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fyourtenant.sharepoint.com%2Fsites%2FsiteA%2FLibraryB%2F*%3C%2FA%3E%22%20OR%26nbsp%3BPath%3A%22%3CA%20href%3D%22https%3A%2F%2Fyourtenant.sharepoint.com%2Fsites%2FsiteB%2FLibraryC%2F*%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fyourtenant.sharepoint.com%2Fsites%2FsiteB%2FLibraryC%2F*%3C%2FA%3E%22%3C%2FP%3E%3CP%3EEtc.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional 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 (Occasional 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.