How to write OR and AND combination in KQL query?
-
08-01-2021 - |
Domanda
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.
Soluzione
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"
.
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a sharepoint.stackexchange