Search code examples
restsharepoint-2013sharepoint-search

How to find matched items with specific characters/numbers at the start using SharePoint REST Search API query?


Suppose we have columns Col_1 and Col_2. Col_1 is single line of text column and Col_2 is number column. Now lets consider Col_1 is having values like OneTwoThreeFour, FourFiveOneTwoSixSeven etc and Col_2 is having values like 123456, 451267 etc.

I am already using SharePoint REST Search API. I want to form the query in such a way that if user searches for OneTwo , SharePoint REST Search API should return OneTwoThreeFour and not FourFiveOneTwoSixSeven. Similarly if the user searches for 12 SharePoint REST Search API should return 123456 and not 451267

What will be the SharePoint REST Search API query for this scenario?


Solution

  • SharePoint KQL to filter by managed property, for example property:"value*"

    Tip: KQL queries don't support suffix matching