[tracker/tracker-0.10] tracker-needle: Make title-only searches non case sensitive



commit 7ef7c4ad6e606400f117b896e7d9937e7dbbe09e
Author: Vincent Untz <vuntz gnome org>
Date:   Thu Mar 3 15:08:04 2011 +0000

    tracker-needle: Make title-only searches non case sensitive
    
    Fixes GB#642774, Make "title-only" search non-case sensitive (Normal / normal)

 src/tracker-needle/tracker-query.vala |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/src/tracker-needle/tracker-query.vala b/src/tracker-needle/tracker-query.vala
index 87c7fd8..b4daf40 100644
--- a/src/tracker-needle/tracker-query.vala
+++ b/src/tracker-needle/tracker-query.vala
@@ -76,7 +76,9 @@ public class Tracker.Query {
 			break;
 			
 		case Type.ALL_ONLY_IN_TITLES:
-			query = @"SELECT ?u nie:url(?u) tracker:coalesce(nfo:fileName(?u), \"$unknown\") nfo:fileLastModified(?u) nfo:fileSize(?u) nie:url(?c) WHERE { ?u a nfo:FileDataObject ; nfo:belongsToContainer ?c ; tracker:available true . FILTER(fn:contains(nfo:fileName(?u), \"$criteria_escaped\")) } ORDER BY DESC(nfo:fileName(?u)) OFFSET $offset LIMIT $limit";
+			string criteria_escaped_down = criteria_escaped.down();
+
+			query = @"SELECT ?u nie:url(?u) tracker:coalesce(nfo:fileName(?u), \"$unknown\") nfo:fileLastModified(?u) nfo:fileSize(?u) nie:url(?c) WHERE { ?u a nfo:FileDataObject ; nfo:belongsToContainer ?c ; tracker:available true . FILTER(fn:contains(fn:lower-case(nfo:fileName(?u)), \"$criteria_escaped_down\")) } ORDER BY DESC(nfo:fileName(?u)) OFFSET $offset LIMIT $limit";
 			break;
 
 		case Type.APPLICATIONS:



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]