Forum Discussion

hpandey's avatar
6 years ago

Filter posts by Labels

Filterung posts by Labels is possible or not? If yes, can we apply AND , OR into LIQl I.e. filter on the basis of more than one label.

2 Replies

  • AND/Or I think not so much directly in ONE query, but the default is this:

    select * from messages where labels.text in ('test','test2')

  • Parshant's avatar
    Parshant
    Boss
    6 years ago

    hpandey,

    You can use below liql query of constraints to get the messages from multiple labels. and you can also use AND/OR for query one or more fields for the messages records.

    SELECT id FROM messages WHERE labels.text IN ('headphones', 'wireless', 'cordless')

     You can check all supported constraints here.