Forum Discussion

Akenefick's avatar
Akenefick
Genius
3 years ago

Using OR and AND with LiQL constraints.

I am trying to use ORs and ANDs with a LiQL query using parentheses to group my ORs like this:

WHERE kudos.sum(weight) < 2 AND (status.key="new" OR status.key="needs_info")

It is apparently only paying attention to the first constraint inside the parentheses. I have done this successfully before with body and subject keywords like this:

WHERE labels.text = 'headphones' AND (body MATCHES "wireless" OR subject MATCHES "wireless")

Is grouping like that allowed or is the body subject a special case? Can't figure out what I'm doing wrong. Thanks.

 

 

  • Nevermind I found the answer here Using LiQL (khoros.com) it says

    "OR operator support is limited to keyword searches using MATCHES."

    So I guess I will just have to do multiple queries to do what I am trying to do.