Forum Discussion

Justin_Gaultier's avatar
Justin_Gaultier
Copper Contributor
Nov 16, 2023
Solved

Sharepoint Search verticals - Search in result source

Hello !
I'd like to make sure that in my sharepoint configuration, in the microsoft search, when my users do a search and select a certain vertical, that the results come from a specific origin of results.
So I've created a vertical area that takes the term that the user, but then I can't see what to put as an element so that the search looks specifically in a result source. For example, to search several lists, it would look like this:
{searchTerms} (ListID:id-of-my-list OR ListID:id-of-my-list)

Except that I need to specify a search order, and I think I'm obliged to go through a result origin. Except I don't know what to replace the ListID with. I've tried several things like sourceId, contentID, ... But nothing seems to work.

I think it must be possible because in the PnP Modern Search plugin it's possible to search in a result origin and the way it works (I've looked a little in the code) seems to be similar to microsoft search.

I'd be grateful if someone could shed some light on this. Thanks in advance!

 

8 Replies

    • Justin_Gaultier's avatar
      Justin_Gaultier
      Copper Contributor
      Hi ! I try with the path property but I can't find the good one. I guess I see it's possible to search in folder but idk what url should I put to search in the results source. Hope you can help me ! Thanks for your previous answer !
      • DaveMehr365's avatar
        DaveMehr365
        MVP

        Hello Justin_Gaultier 

         

        in Microsoft Search you can use the PATH property with a predefined path, only results from this path will be appear in the search results. Example resuls from the whole site:

         

         

        Best, Dave

    • Justin_Gaultier's avatar
      Justin_Gaultier
      Copper Contributor

      DaveMehr365 

      Thanks for ur answer, i can't test now, but i can call a results source with the path property ? Can you give me an example when using a results sources ? 

      Thanks a lot !