Question

I have to build KQL using combination of multiple AND and OR. I have following query:

((Property1:Value OR Property2:Value) AND (Property3:Value AND Property4:Value))

I have tried above query but it doesn't worked for me.

Can any one help me out in building query in proper syntax?

I am working with SP2016 and Search.

Any reference link apart from this is welcomed.

Was it helpful?

Solution

Your syntax is fine. You should also know that there is a difference in KQL between = and :. The equals sign is equality. SO if you are seeking a phrase it should be enclosed in quotes. MyProperty="these words" The colon is the contains operator. You can add a * for suffix wildcard matching. MyProperty:words or MyProperty:word* or MyProperty:"these words".

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top