Forum Discussion

amyharkus's avatar
amyharkus
Copper Contributor
Jul 08, 2024

PnP Modern Search v4 query text

i've installed the PnP modern search but am having trouble with the SharePoint Search Query text 

 

I'd like it to search only within two document libraries I have on the page, I have tried using the path to this location but and still getting results from other locations. 

 

 

I'm new to this so i could be missing something important. 

 

What i would like is a search box (i have this and its connected to the results) and results just pointing to those two libraires. 

 

Thanks in advance. 

 

1 Reply

  • Hello amyharkus 

     

    you can use this query and settings for results from two libraries:

    {searchTerms} Path:"https://<TENANT>.sharepoint.com/sites/DocumentStore/StrukturierteDokumente/" OR Path:"https://<TENANT>.sharepoint.com/sites/DocumentStore/Article/"

     

     

    You can connect the results webpart with your search box.

     

    Best, Dave

Resources