Bug 421943 - Wishlist: Search for items without a tag in Advanced search
Summary: Wishlist: Search for items without a tag in Advanced search
Status: RESOLVED WORKSFORME
Alias: None
Product: digikam
Classification: Applications
Component: Searches-Advanced (show other bugs)
Version: 7.0.0
Platform: Appimage Linux
: NOR wishlist
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-05-22 23:54 UTC by MarcP
Modified: 2020-05-23 18:15 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 7.0.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description MarcP 2020-05-22 23:54:49 UTC
It is possible to create a complex filter including tags that should not be displayed. However, it does not seem to be possible to replicate these filters using an advanced search. 

So, I think it would increase flexibility to have the option "Return items without tag" in the advanced search dialog.
Comment 1 Maik Qualmann 2020-05-23 05:12:55 UTC
The advanced search already has this option. A checkbox for images that do not contain tags.

Maik
Comment 2 MarcP 2020-05-23 10:42:22 UTC
No, I mean something else. Not to search for images empty of tags, but to search for images without specific tags. E.g. pictures of my last summer without my ex-girlfriend.
Comment 3 Maik Qualmann 2020-05-23 12:11:06 UTC
This search is also necessary without any major problem.

First exlude tags:
You select "None of these conditions are met" as the search condition in the header under options. You choose your tags and here as an option "In One of".

Now include tags:
Add a search group with "OR".
Now add tags that should appear ("In One of"). Voila...

I do not think that we implement an additional negative search for tags within a selected search group.

Maik
Comment 4 MarcP 2020-05-23 14:13:07 UTC
Ohh, I didn't know you could add several search groups. Then it was already possible. 

Thanks!
Comment 5 MarcP 2020-05-23 14:36:52 UTC
Sorry again, I am trying to exclude a list of tags from a search, but I am not sure If I understand correctly.

I want a search where two brothers must appear (Brother1, Brother2), but without the presence of any of two people (Person1, Person2).

So, in my mind I want to do that:
(Brother1 AND Brother2) AND NOT(Person1 OR Person2).

To do that, I first create a search group where "Meet all the following conditions" and I select the Brother1 and Brother2 tags.

Then I add a second search group, this time with "At least one of these conditions is not met", and I select Person1 and Person2 from the tag list.

But this is not working. Maybe because selecting the two persons to exclude at the same time is causing this (because the selected tags are considered a single condition)?
(Brother1 AND Brother2) AND NOT((Person1 AND Person2)).


I guess the solution is to create a search group for every excluded person, so it looks like:
(Brother1 AND Brother2) AND NOT(Person1) AND NOT(Person2)
Comment 6 Maik Qualmann 2020-05-23 17:31:40 UTC
You only need 2 groups:

Select first normal group, tags brother1 and brother2 (in ALL)
Second group "None of these conditions are met" as "AND" with the tags Person1 and Person2 (In One of).

Maik
Comment 7 MarcP 2020-05-23 17:36:20 UTC
Ok ok ok, I didn't see the "In All / In One of" option next to the tag list. Works perfectly now, thanks.
Comment 8 Maik Qualmann 2020-05-23 17:53:47 UTC
Yes, I know the advanced search is complex, but also very powerful if you add more search groups. I know that your focus is on tags, but a reversal within the search group only for tags makes no sense, then this should also be available for all other options. Maybe we would need a good tutorial for the advanced search. I close the bug.

Maik
Comment 9 MarcP 2020-05-23 18:15:46 UTC
Sure. I like it the way it is, I just didn't know about some options. As long as it provides all that flexibility, it's fine.

Maybe the only thing I would miss would be to directly input SQL-like queries, but I don't know if that's even possible.