Forum Discussion
Restrict kql search query to specific div in a page
- Aug 11, 2022
Hello mattchowell
to restrict the query for a specific field only, you can use {searchTerms} in your query.
Here is an example:
contentclass:STS_ListItem_WebPageLibrary IsContainer<>true RefinableString101:{searchTerms}
I have mapped the crawled property ows_CanvasContent1 to a managed property RefinableString101:
contentclass and iscontainer are only additional parameter to specific search for pages, without template folder. You can define them according to your choice.
Hope this helps.
Regards, Dave
Hello mattchowell
to restrict the query for a specific field only, you can use {searchTerms} in your query.
Here is an example:
contentclass:STS_ListItem_WebPageLibrary IsContainer<>true RefinableString101:{searchTerms}
I have mapped the crawled property ows_CanvasContent1 to a managed property RefinableString101:
contentclass and iscontainer are only additional parameter to specific search for pages, without template folder. You can define them according to your choice.
Hope this helps.
Regards, Dave
DaveMehr365 Thanks, this worked great!
Path: https://xxx.sharepoint.com/sites/xxx/SitePages PromotedState:2 contentclass:STS_ListItem_WebPageLibrary IsContainer<>true RefinableString09:{searchTerms} -ContentClass=urn:content-class:SPSPeople