Forum Discussion
How do I provide search of a specific document library on my content page?
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
DaveMehr365 Can you have more than one library to search against?
- michalkornetJun 05, 2024Iron 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
- Kim WilliamsJun 05, 2024Brass Contributor
michalkornet That is what I am going to try, I have about 5 libraries.