You can create all possible queries with the three basic operators AND, OR and NOT if I remember correctly. However, NOT does not seem to be implemented. It's neither in advancedqueryparser.cpp nor mentioned in baloosearch6. Using the Shell (here: Fish) you can use the following very crude workaround on the command line: comm -23 (baloosearch6 "tag:TAG1" 2>/dev/null | sort | psub) (baloosearch6 "tag:TAG2" 2>/dev/null | sort | psub) But this is obviously not available in, e.g., Dolphin's GUI.
(In reply to pat_h from comment #0) > ... NOT does not seem to be implemented ... That's a big ask! > Using the Shell (here: Fish) you can use the following very crude workaround > on the command line: > comm -23 (baloosearch6 "tag:TAG1" 2>/dev/null | sort | psub) (baloosearch6 > "tag:TAG2" 2>/dev/null | sort | psub) That works, it is effectively a "AND NOT" as in "tag:TAG1 AND NOT tag:TAG2" You would also have to deal with "NOT tag:TAG1" and maybe even "OR NOT tag:TAG1", there's be a lot of work. > > But this is obviously not available in, e.g., Dolphin's GUI.
Hi - merging this in with the existing report on baloo supporting negation in queries, thanks! *** This bug has been marked as a duplicate of bug 424165 ***