Version: digikam 0.81 (using KDE KDE 3.5.0) Installed from: Ubuntu Packages OS: Linux An image wich is not tagged or have any comments wont display in the search result. Which means, if you search for the image name, it wont be displayed.
I confirm but the bug is not really as describe If the table ImageProperties is empty nothing is found.... I think a left join should be better. For example I put a rating on a picture then the ImageProperties get one entry, and the I can find it for digikam 0.8.1 on kubuntu kde 3.5
I have reproduced this bug, using digiKam 0.8.1. I have triend to search with a keyword present in most names of my images ('2006' because I have some photos that are named 2006*.jpg) and the search won't find any photos After, I've added a comment 'test' to one photo, and search for this keyword in the search tool. The photo was instantly found !
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;
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;
Tom, I have tested your SVN commits : quick and advanced searches work fine now. Thank you for the fix. --- Tung.