[Feature Request] Add Exclusion Options to Baloo Searches

It could be very handy to have a way to add exclusions to a search. For example, if you have tags A and B with some overlap, the following work as expected:

  • baloosearch6 "tags:A OR tags:B"
  • baloosearch6 "tags:A AND tags:B"

However, the following does not work:

  • baloosearch6 "tags:A AND NOT tags:B"

Ideally, adding the NOT keyword would make it so baloo returns everything that is in A except for things that are also in B.

I was trying to think of how this would work with the OR operator, and think it might be best to make NOT only modify what AND does, unless there’s a clear logic that could be applied to OR that I’m just not thinking of.

If feature requests go somewhere else, please let me know - I didn’t know if they go here, on the bug tracker, or some other site.

1 Like

Hi - definitely sounds like a good idea! KDE Discuss (this forum) is a perfectly fine place to brainstorm ideas, but feature requests that are ready to submit for consideration should go through the KDE Bugtracking System to make sure they can be triaged and be reviewed by developers as they are able.

The general community guide to reporting issues through that system is here: Get Involved/Issue Reporting - KDE Community Wiki

However, in this case, this feature request already exists, so there wouldn’t be a need for filing a new request! 424165 – Negated terms in queries

This request looks like it has the start of an idea for how to implement, so if you’re feeling adventurous, it might be a good one to look at to understand how the code could come together :slight_smile:

Hope that helps,

Thank you! It’s nice to know I’m not the only one who’s encountered this, even if it is daunting to see it hasn’t been fixed in 4 years, indicating that it might be too big of a change for me to tackle as someone who has barely any experience in C/C++.

I’m right there with you, I couldn’t fix that one either - just didn’t want to rule out the possibility and make sure everyone knows the door for contribution is open whenever folks are able.

That’s why I don’t lose hope on those matters - even with issues that have existed for a while, someone can come along with the time, ability and interest and bring a different perspective to a problem, and one person’s insight can make everyone’s experience a little better :slight_smile: