Forum Discussion

irshad313's avatar
irshad313
Copper Contributor
Feb 13, 2025
Solved

Shearpoint PnP Modern Search

In shearpoint PnP modern search when I put any text in search box I want result to appear from only one site how should I customize this change in my current solution to get my desired output

  • Hi irshad313 

    you can use the Path property in your query template, as example only from the site "MSTEvents":

     

    {SearchTerms} Path:“https://mehr365.sharepoint.com/sites/MSTEvents/“

     

    You can see more details in my blog post: https://www.mehr365.com/gezielt-inhalt-suchen-mit-der-eigenschaft-path/

     

    Best, Dave

  • irshad313's avatar
    irshad313
    Copper Contributor

    Hello DaveMehr365 Thanks a lot It worked, I have one more query please if you can answer, I want to implement two verticals for one search result web part scenario would be like if I select one option from 1st vertical then then I will three more options on second vertical and in search result web part the result with combination of both verticals will appear is there any way we can do this?

  • Hi irshad313 

    you can use the Path property in your query template, as example only from the site "MSTEvents":

     

    {SearchTerms} Path:“https://mehr365.sharepoint.com/sites/MSTEvents/“

     

    You can see more details in my blog post: https://www.mehr365.com/gezielt-inhalt-suchen-mit-der-eigenschaft-path/

     

    Best, Dave

Resources