Help: my card query doesn't behave the way I want it to

Hey all, so I’ve got 52 total cards and 15 of them either contains the hashtags #documentation #flashcard-exclude #questions #concerns which I don’t want to include in my review. So, I created the card query {{cards (NOT (OR #documentation #flashcard-exclude #questions #concerns) )}} but 52 of my cards still show up when it should only be 52-15=37. Anyway, here’s the pic:

Can you help me correct my query if its wrong? Thanks

Update: it’s super weird and I don’t know why it works but the card query {{cards (AND (NOT #concerns) (NOT #questions) (NOT #flashcard-excluded) (NOT #documentation))}} seems to solve my concern. I wish someone could explain why {{cards (NOT (OR #documentation #flashcard-exclude #questions #concerns) )}} doesn’t work but the solution i gave does; it just makes no logical sense to me at all. And the documentation on simple queries at is super concise that it doesn’t help when troubleshooting.

Such queries are based on Datalog, where the clauses are not typical boolean/logical ones. Therefore, the above two queries that under De Morgan’s theorem would otherwise be equivalent, in Datalog they actually produce different sets. On the bright side, they do this consistently.

1 Like

This is anything that doesn’t have either #documentation, #flashcard-exclude etc.
So a card with #documentation and not #flashcard-exclude will be valid as it excludes one of the things listed.

However we want cards that have none of these things.
So not #documentation and also not #flashcard-exclude and so on.

Datalog has an implicit and, so it should work with {{cards (NOT #documentation #flashcard-exclude #questions #concerns)}} as well.