May 20 2022 06:57 PM - edited May 21 2022 06:25 AM
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.
May 23 2022 02:37 AM
Hello @Vanessa Martin9
you need to configure your results web part with a specific path for your results. In the query, also in classic, you can add a search results and change the query like this:
The current path:
{searchboxquery} Path:{site.url}
Or a specific path and only documents:
{searchboxquery} Path:"https://TENANT.sharepoint.com/sites/SPOClassicEnterpriseWiki/Documents/" IsDocument:1
Regards, Dave