Forum Discussion
SteveKnutson
May 07, 2022MVP
Microsoft Search KQL question
I want to create a custom search vertical in Microsoft Search that returns People results only. I have created a new Search Vertical and added the following KQL in the Query option but it doesn't ret...
Maggan_W
May 10, 2022Brass Contributor
SteveKnutson, your query should work, but you can try modifying it to this:
{?{searchTerms} ContentClass=urn:content-class:SPSPeople}
Have you checked that your result source includes Local People Results?
https://27sb3h-admin.sharepoint.com/_layouts/15/searchadmin/ManageResultSources.aspx?level=tenant
SteveKnutson
May 10, 2022MVP
Maggan_W thank you, I think that helps answer my question.
Microsoft Search doesn't allow you to select a specific result source when creating a custom search vertical. The "SharePoint" option doesn't include people results, which is why I get nothing back when I use the KQL query.
I've gone with plan-b and used PnP Search with some filtering to exclude guest users. That does the trick for now.
- prahalskiMar 12, 2023Copper ContributorI've been trying to find a way to allow selection of workloads besides SharePoint for custom verticals. Not sure why, but Microsoft Search only allows SharePoint. Any idea why and/or how to get around this?