0

I am trying to search for two title fields in a SharePoint list using KQL and can't seem to get this to work. I can get it to work for a single Column, but I can't get it to search for a second column.

In this example it will search the title field, but it will not search the TestName field.

Title:({searchTerms}) OR Test_x0020_Name:({searchTerms}){896d37b8-2727-448f-b2eb-135abcdefgdc}
  • I have removed Title and replaced with Test_x0020_Name and it still will not search.
  • I have reindexed the list but this also did not help.
  • I also tried adding a new field with a cleaner name "TestName" and that also does not turn up any results.
  • Both of these fields are regular text fields

Is my syntax right for doing a search for one or the other search terms?

Any pointers on where to go for more information would also be appreciated, don't mind doing the research.

1
  • Did you create managed properties for your list columns & mapped with corresponding crawled properties? Nov 3, 2021 at 6:21

1 Answer 1

1

If you are using list column, you need to map the related crawled property to built in managed property(or create a new managed property)in search schema:

enter image description here After mapping it to a valid built in managed property,wait for a while,or you could create a site column and add it to your library,fill in values, SharePoint will creat the managed property automatically. enter image description here

Simple test result: enter image description here Similar issue for your reference:

https://docs.microsoft.com/en-us/answers/questions/408476/how-to-filter-sharepoint-online-queries-kql-docume.html

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.