Bug 296941

Summary: imageviewer: search doesnt return results for some words; or doesnt recognize word-fragments
Product: [Unmaintained] Active Reporter: Fania Bremmer <fania.bremmer>
Component: ApplicationsAssignee: active
Status: RESOLVED FIXED    
Severity: minor CC: lamarque, thomas.pfeiffer
Priority: NOR    
Version: unspecified   
Target Milestone: unscheduled   
Platform: Meego/Harmattan   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Fania Bremmer 2012-03-28 07:22:17 UTC
on 2012-03-27-15-24-basyskom-plasma-active-testing-meego-usb-live.iso 
This is an old bug that I encountered already for Release Plasma Active Two. I do not remember if there were technical problems that we cannot improve the search, but this is what I would expect our search can provide:

- open the image viewer
- search in the search field for "marbles"  > no result is been shown, but we have an image called "marbles.jpg"
- search in the search field for only "ma" > no result is been shown. Does the search not support word fragments?
Comment 1 Lamarque V. Souza 2012-03-28 11:01:48 UTC
Image viewer is coded to only start nepomuk searchs with three or more characters in the input field. Nepomuk search is expensive and slow, it is not worth doing it for a small two character fragment.

For the the first problem I have noticed it too. I have no clue as to why it happens. Problems in nepomuk source code are more complicated to debug and this one seems to be one of them.
Comment 2 Thomas Pfeiffer 2012-03-28 11:19:20 UTC
In the first case, the problem is that the search does not start with less then three characters, but instead of still showing all images, none are shown when one or two characters are entered. This is definitely a usability problem.
So I see two possible solutions here:
1. Show all images until the user enters at least three characters
2. Don't show images if one or two characters are entered, but instead write "Enter at least three characters to start searching" into the results area.
Comment 3 Fania Bremmer 2012-03-28 11:44:25 UTC
+1 for solution number #2.
It indicates that the system is already doing something. And shows that currently no results is not an error, but intended.
Comment 4 Lamarque V. Souza 2012-03-31 00:46:04 UTC
Git commit 6947cfa0b8b6a12788741e10bc4116400d09079d by Lamarque V. Souza.
Committed on 31/03/2012 at 02:42.
Pushed by lvsouza into branch 'mart/useFullScreenSheet'.

Revert "remove regexp as nepomuk anyway does a substring match using contains()"
Nepomuk does not do substring match with contains. Active image-browser
now shows results for any subtring (even for one character).

This reverts commit b789c94de9c3d88e88809099b27126e30d1dde5c.

M  +2    -1    components/metadatamodel/metadatamodel.cpp

http://commits.kde.org/plasma-mobile/6947cfa0b8b6a12788741e10bc4116400d09079d
Comment 5 Lamarque V. Souza 2012-03-31 02:41:10 UTC
Git commit 6d36741809fba9c408179f9d29b0a47aea3e4e6f by Lamarque V. Souza.
Committed on 31/03/2012 at 02:42.
Pushed by lvsouza into branch 'master'.

Revert "remove regexp as nepomuk anyway does a substring match using contains()"
Nepomuk does not do substring match with contains. Active image-browser
now shows results for any subtring (even for one character).

This reverts commit b789c94de9c3d88e88809099b27126e30d1dde5c.
(cherry picked from commit 6947cfa0b8b6a12788741e10bc4116400d09079d)

M  +2    -1    components/metadatamodel/metadatamodel.cpp

http://commits.kde.org/plasma-mobile/6d36741809fba9c408179f9d29b0a47aea3e4e6f
Comment 6 Thomas Pfeiffer 2012-04-03 09:04:48 UTC
Works like a charm now!
The problems Fania described cannot be reproduced anymore.
Comment 7 Lamarque V. Souza 2012-04-04 12:57:28 UTC
Git commit 92c24bf3d8e300d131421d26e21daf40be58fc0b by Lamarque V. Souza.
Committed on 31/03/2012 at 02:42.
Pushed by lvsouza into branch 'Active/2.1'.

Revert "remove regexp as nepomuk anyway does a substring match using contains()"
Nepomuk does not do substring match with contains. Active image-browser
now shows results for any subtring (even for one character).

This reverts commit b789c94de9c3d88e88809099b27126e30d1dde5c.
(cherry picked from commit 6947cfa0b8b6a12788741e10bc4116400d09079d)
(cherry picked from commit 6d36741809fba9c408179f9d29b0a47aea3e4e6f)

M  +2    -1    components/metadatamodel/metadatamodel.cpp

http://commits.kde.org/plasma-mobile/92c24bf3d8e300d131421d26e21daf40be58fc0b
Comment 8 Lamarque V. Souza 2012-04-24 00:47:23 UTC
Fixed in 2012-04-23-16-57-basyskom-plasma-active-testing-meego-usb-live.iso