Forum Discussion
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!
Hello Justin_Gaultier
when you wanna use the Microsoft Search Box on top, do you need to configure modern Search verticals: https://learn.microsoft.com/en-us/microsoftsearch/manage-verticals?WT.mc_id=DX-MVP-5004845
When you wanna use your classic Search Result Sources, you can this in use PnP Modern Search WebParts: https://microsoft-search.github.io/pnp-modern-search/usage/search-results/data-sources/
You can also use the Modern Search Box on top with a custom PnP Modern Search page: https://learn.microsoft.com/en-us/microsoftsearch/create-search-results-pages?WT.mc_id=DX-MVP-5004845
Best, Dave
8 Replies
Hello Justin_Gaultier
do you mean the PATH-Property?
Here you can find all about it: https://www.mehr365.com/gezielt-inhalt-suchen-mit-der-eigenschaft-path/
Best, Dave
- Justin_GaultierCopper ContributorHi ! 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 !
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_GaultierCopper Contributor
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 !