Bug 120775 - Search doesn't find pictures without rating
Summary: Search doesn't find pictures without rating
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Searches-Labels (show other bugs)
Version: 0.8.1
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-01-25 12:24 UTC by Stéphane Pontier
Modified: 2017-08-18 09:45 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 0.9.0
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stéphane Pontier 2006-01-25 12:24:32 UTC
Version:           0.8.1 (using KDE KDE 3.5.0)
Installed from:    Ubuntu Packages
OS:                Linux

When trying to do a search with digikam 0.8.1 I've just upgraded from 0.8, I found no picture on my last search.
I tried a very simple search (album with name containing "200") but found nothing.
When I added a rating to pictures. the search was showing those picture, it seem that as long as a picture doesnt have a rating value (even if the rating is 0) in the ImageProperties table, this picture is invisible to the search tool.
Comment 1 Tung NGUYEN 2006-02-02 23:16:39 UTC
Yes, for both quick and advanced searches.
Comment 2 Tom Albers 2006-02-03 22:03:37 UTC
SVN commit 505430 by toma:

I'm very sorry I made the search as good as useless in 0.8.1. I hope this fixes this issue (thanks for the hint Maxime).
Can anyone fonfirm that?
BUG: 120479,120775


 M  +4 -4      digikamsearch.cpp  


--- branches/stable/extragear/graphics/digikam/kioslave/digikamsearch.cpp #505429:505430
@@ -136,7 +136,7 @@
 
         // query head
         sqlQuery = "SELECT Images.id, Images.name, Images.dirid, Images.datetime, Albums.url "
-                   "FROM Images, Albums, ImageProperties "
+                   "FROM Images, Albums LEFT JOIN ImageProperties ON Images.id = Imageproperties.imageid "
                    "WHERE ( ";
 
         // query body
@@ -144,7 +144,7 @@
 
         // query tail
         sqlQuery += " ) ";
-        sqlQuery += " AND (Albums.id=Images.dirid) AND (Images.id = ImageProperties.imageid); ";
+        sqlQuery += " AND (Albums.id=Images.dirid); ";
 
         QStringList values;
         QString     errMsg;
@@ -240,7 +240,7 @@
 
         // query head
         sqlQuery = "SELECT Albums.url||'/'||Images.name "
-                   "FROM Images, Albums, ImageProperties "
+                   "FROM Images, Albums LEFT JOIN ImageProperties on Images.id = ImageProperties.imageid "
                    "WHERE ( ";
 
         // query body
@@ -248,7 +248,7 @@
 
         // query tail
         sqlQuery += " ) ";
-        sqlQuery += " AND (Albums.id=Images.dirid) AND (Images.id = ImageProperties.imageid) ";
+        sqlQuery += " AND (Albums.id=Images.dirid) ";
         sqlQuery += " LIMIT 500;";
 
         QStringList values;
Comment 3 Tom Albers 2006-02-03 22:12:24 UTC
SVN commit 505437 by toma:

forwardport SVN commit 505430 by toma: I'm very sorry I made the search as good as useless in 0.8.1. I hope this fixes this issue (thanks for the hint Maxime).
CCBUG: 120479,120775



 M  +4 -4      digikamsearch.cpp  


--- trunk/extragear/graphics/digikam/kioslave/digikamsearch.cpp #505436:505437
@@ -136,7 +136,7 @@
 
         // query head
         sqlQuery = "SELECT Images.id, Images.name, Images.dirid, Images.datetime, Albums.url "
-                   "FROM Images, Albums, ImageProperties "
+                   "FROM Images, Albums LEFT JOIN ImageProperties ON Images.id = Imageproperties.imageid "
                    "WHERE ( ";
 
         // query body
@@ -144,7 +144,7 @@
 
         // query tail
         sqlQuery += " ) ";
-        sqlQuery += " AND (Albums.id=Images.dirid) AND (Images.id = ImageProperties.imageid); ";
+        sqlQuery += " AND (Albums.id=Images.dirid); ";
 
         QStringList values;
         QString     errMsg;
@@ -240,7 +240,7 @@
 
         // query head
         sqlQuery = "SELECT Albums.url||'/'||Images.name "
-                   "FROM Images, Albums, ImageProperties "
+                   "FROM Images, Albums LEFT JOIN ImageProperties on Images.id = ImageProperties.imageid "
                    "WHERE ( ";
 
         // query body
@@ -248,7 +248,7 @@
 
         // query tail
         sqlQuery += " ) ";
-        sqlQuery += " AND (Albums.id=Images.dirid) AND (Images.id = ImageProperties.imageid) ";
+        sqlQuery += " AND (Albums.id=Images.dirid) ";
         sqlQuery += " LIMIT 500;";
 
         QStringList values;
Comment 4 Nadav Kavalerchik 2006-06-25 10:50:28 UTC
i'm using the latest build from svn (0.8.2 - rc1) and this issue is still disabling the search. ( fedora devel, compiled from sources )