Forum Discussion
MVCuser
May 24, 2022Brass Contributor
SharePoint PnP Search Results
Hi! Does anybody know how to use the Query Template and Refinement Filters part in PnP Search Results to exlude pages from the search? I have a Knowledge Hub and created a search page. The Search ...
Warwick Ward
May 25, 2022Bronze Contributor
Build your KQL query can be tricky at time, i've found creating a classic SharePoint page, adding the classic Search webparts and using the old UI to build your requirement can really help, then just copy the query built over into the new PnP Webparts.
you probably looking from something like the below to filter out main the title (using a - minus before it says you don't want to include any matches)
-title:"*main*"
https://docs.microsoft.com/en-us/sharepoint/dev/general-development/keyword-query-language-kql-syntax-reference
you probably looking from something like the below to filter out main the title (using a - minus before it says you don't want to include any matches)
-title:"*main*"
https://docs.microsoft.com/en-us/sharepoint/dev/general-development/keyword-query-language-kql-syntax-reference
MVCuser
May 25, 2022Brass Contributor
Thank you very much for answering my question!
I've never use this KQL before so don't even know how to separare the different filters (I tried , : Space and either the separator is wrong or the query)
I tried -Title:"*Main" Tile:-"*Main" Title:"-*Main" Same with FileName just in case but still nothing this is so frustrating. 😞
I've never use this KQL before so don't even know how to separare the different filters (I tried , : Space and either the separator is wrong or the query)
I tried -Title:"*Main" Tile:-"*Main" Title:"-*Main" Same with FileName just in case but still nothing this is so frustrating. 😞