Bug 500414 - Supporting NOT in queries in addition to AND and OR
Summary: Supporting NOT in queries in addition to AND and OR
Status: RESOLVED DUPLICATE of bug 424165
Alias: None
Product: frameworks-baloo
Classification: Frameworks and Libraries
Component: general (other bugs)
Version First Reported In: 6.10.0
Platform: Debian testing Linux
: NOR wishlist
Target Milestone: ---
Assignee: baloo-bugs-null
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-02-19 14:34 UTC by pat_h
Modified: 2025-03-14 04:23 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description pat_h 2025-02-19 14:34:35 UTC
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.
Comment 1 tagwerk19 2025-02-20 13:30:33 UTC
(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.
Comment 2 John Kizer 2025-03-14 04:23:20 UTC
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 ***