Bug 163227 - Searching for tag names in simple and advanced search doesn't work
Summary: Searching for tag names in simple and advanced search doesn't work
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Unclassified
Component: Searches-Advanced (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal (vote)
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-06-04 20:52 UTC by Andi Clemens
Modified: 2017-08-18 06:29 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 0.9.4


Attachments
fixes search problem (4.61 KB, patch)
2008-06-04 20:55 UTC, Andi Clemens
Details
patch 2 (5.70 KB, patch)
2008-06-05 11:56 UTC, Andi Clemens
Details
patch 3 (6.44 KB, patch)
2008-06-05 16:26 UTC, Andi Clemens
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andi Clemens 2008-06-04 20:52:53 UTC
Version:           0.9.4-rc (using 3.5.9, Arch Linux)
Compiler:          Target: i686-pc-linux-gnu
OS:                Linux (i686) release 2.6.25-ARCH

When using the simple or advanced search to find tag names, digiKam will show no results. For example if you have the family name "Clemens" and search for it, the SQL query will return no results. It seems to miss the "%" character in the LIKE query string.
Comment 1 Andi Clemens 2008-06-04 20:55:34 UTC
Created attachment 25124 [details]
fixes search problem

This patch fixes the following issues:

* simple and advanced search doesn't work for tag names
* lineedit widget in advanced search will expand, it was too short if window is
resized
* not needed search conditions are removed (searching for Tag doesn't need the
condition "contains" for example)

Gilles, Marcel, Arnd,

what do you think? Can I commit this?

Andi
Comment 2 Andi Clemens 2008-06-05 10:38:55 UTC
I've found another problem: When editing an advanced search that has not any search rule with a lineedit field in it, the operator combobox becomes too small. If you edit a saved advanced search with a lineedit rule (like Tag name for example), the combobox is sized well.
I will also try to fix this issue with this patchset.
Comment 3 Andi Clemens 2008-06-05 10:40:23 UTC
Additional info to #2:

If you generate a new advanced search, the operator comboxbox is always sized well, only saved advanced searches that are edited will behave strange sometimes.
Comment 4 Andi Clemens 2008-06-05 11:56:09 UTC
Created attachment 25133 [details]
patch 2

the patch fixes the following issue:

some items in the operator combobox were not readable, because the box was
resized on key change. Now the box is prepopulated with all operators first and
the size is saved on every key change.
Comment 5 caulier.gilles 2008-06-05 12:01:52 UTC
Andi,

This is relevant of this old entry (closed with KDE4 port) :

http://bugs.kde.org/show_bug.cgi?id=147636

Gilles
Comment 6 Andi Clemens 2008-06-05 12:24:08 UTC
Sure it might be fixed in KDE4 port, but not in the current stable version of digiKam. But the initial problem of this bugreport is not the widget behavior, but the search for tag names which didn't work anymore. The patch should solve this problem...
Comment 7 caulier.gilles 2008-06-05 12:36:41 UTC
Andi,

Why are you removed "LIKE" and "NLIKE" rules for tags searches ?

Gilles


Comment 8 Andi Clemens 2008-06-05 12:51:29 UTC
It looks like they are never used.
If you search for a tag, you have the exact tagname in the combobox and there will never be a query for LIKE or NLIKE.
Like in album search. The only two operators allowed in there are EQ and NEQ.
So I removed the LIKE and NLIKE for tags from the rulesOpTable as well as from the kioslave (digikamsearch.cpp:489).
Searching for LIKE and NLIKE in "tag names" is still possible... but for "pure" tag searches I think it should be removed like it is removed in album search.
Comment 9 caulier.gilles 2008-06-05 12:59:18 UTC
Marcel, what do you think about #8

Gilles
Comment 10 Andi Clemens 2008-06-05 13:05:22 UTC
Ok, removing LIKE is wrong, if you want to find all images with a tag under "persons" (persons/andi, persons/gilles) you will need to have LIKE and NLIKE operators. But then it should also be added to album search, because otherwise it is inconsistent.
Comment 11 Andi Clemens 2008-06-05 16:26:30 UTC
Created attachment 25139 [details]
patch 3

fixes the following issues:

* simple and advanced search doesn't work for tag names
* new operators for album search added (LIKE, NLIKE)
* lineedit widget in advanced search will expand, it was too short if window is

resized
* some items in the operator combobox were not readable, because the box was
resized on key change. Now the box is prepopulated with all operators first and

the size is saved on every key change.
Comment 12 caulier.gilles 2008-06-05 17:25:11 UTC
Marcel,

> * new operators for album search added (LIKE, NLIKE) 

==> is implemented in KDE4 ?

Gilles
Comment 13 Andi Clemens 2008-06-06 18:12:26 UTC
Gilles,

I think it is implemented, I just tested the KDE4 version and LIKE for albums is definitely working there. If you select a folder ("2001"), it will search recursively.
Comment 14 Marcel Wiesweg 2008-06-06 23:47:29 UTC
In KDE4 I have called it InTree/NotInTree, and it's currently even the default behavior for the combo box tree views for albums and tags.
Comment 15 Andi Clemens 2008-06-06 23:57:17 UTC
Is it not possible anymore in the KDE4 version to use the "NOT" operators? Like "does not contain" or "does not equal"?
I try to filter images that have NOT the tag "Persons" and that are NOT in folder "2007 and its subfolders". But there is no option in the new search dialog of digiKam 0.10... maybe I'm blind.

Marcel, what do you think of the new operators added in patch 3? I think they should be added to be consistent with the tag search.
Comment 16 Marcel Wiesweg 2008-06-07 12:15:33 UTC
No you're not blind. It's currently not in the UI. The backend can do that without any  problem. It is the problem to balance search capabilities with UI complexity. The least complex solution would be to add "Match none of the following conditions" in the label at the top. You could then add a search group for all "NOT" searches.

As to your patch, feel free to add the operators.
Comment 17 Andi Clemens 2008-06-07 12:44:27 UTC
SVN commit 817988 by aclemens:

fixes the following issues:

* simple and advanced search doesn't work for "tag names"
* new operators for "album" search added (LIKE, NLIKE) to be consistant with "tag" search
* lineedit widget in advanced search needs to expand, it was too short if window is resized
* some items in the operator combobox were not readable, because the box was resized on key change. Now the box is prepopulated with all operators first and its size is restored on every key change.

BUG: 163227

 M  +2 -1      NEWS  
 M  +18 -9     digikam/searchwidgets.cpp  
 M  +12 -5     kioslave/digikamsearch.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=817988