Open shish opened 11 years ago
I am currently testing a basic OR operator: ~tag1 ~tag2 tag3
matches posts with tag3 and either tag1 and/or tag2 . ~tag1 ~tag2 -tag3
matches posts with either tag1 and/or tag2 , except any with tag3. Order doesn't matter, there can be any number of OR operations. It does not work with parentheses.
It also handles negated OR: ~tag1 ~-tag2 ~-tag3
matches posts either with tag1 or which don't contain tag2 or which don't contain tag3 (so a post with tag2 tag4
will match because it doesn't have tag3, but a post with tag2 tag3
will not match)
While I do think OR with parentheses is much easier to use and powerful, they're too advanced for my current experience with parsing and SQL. This format is common enough (used on e621ng, legacy operator on danbooru, documented but 'not working' on safebooru, even though another Gelbooru 0.2 site has parentheses working)
Can it be done without overloading the database?