Problems trying to match by label and body/subject REST V2
Hello,
I'm trying to use LiQL to retrieve posts by label and keywords in body/subject. I've been testing this and I've noticed that the 'MATCHES' query is working inconsistently. Here is my query:
SELECT id, subject, body, board.id, view_href, metrics.views, author.login, post_time FROM messages WHERE labels.text = 'FAQ' AND depth=0 AND labels.text MATCHES ( "stereo", "electro", "kickit") AND body MATCHES ("boys") OR subject MATCHES ("boys") ORDER BY metrics.views DESC LIMIT 5
The query retrieves posts labelled 'FAQ' and posts containing 'boys' however ignores posts containing labels 'stereo', 'electro' and 'kickit'. Now, if I remove the line "AND body MATCHES ("boys") OR subject MATCHES ("boys")" then the line "MATCHES ( "stereo", "electro", "kickit")" works correctly.
It seems they cannot be used together, is there a way I can match posts by label AND body/subject. Keeping in mind it must always contain an 'FAQ' label?
Sorry if this is very confusing.