Forum Discussion

Vanessa Martin9's avatar
Vanessa Martin9
Brass Contributor
May 21, 2022

How do I provide search of a specific document library on my content page?

I have a page with web parts that provide various views of a document library. I would also like to provide a means of searching the document library. I thought I could put a Search Box web part and a Search Results web part on the page and configure the Search Box to just search the specific document library. But, I can't seem to configure the Search Box to narrow the scope. I am in Classic mode

 

I have been doing some research and it seems that I may need to use a Content Editor web part and JavaScript to achieve my goal. If this is the case, I really need help because I am not a programmer.

 

Any suggestions on how I provide a search box of the document library with results on the content page?

Thanks.

4 Replies

      • michalkornet's avatar
        michalkornet
        Iron Contributor

        Kim WilliamsHi, you can try this query to search against more document libraries

         

        (Path:"https://<tenant>sharepoint.com/sites/<site1>/<Document Library>" OR Path: "https://<tenant>.sharepoint.com/sites/<site2>/<Document Library>") IsDocument:1

Resources