[tracker] libtracker-client: Fixed SPARQL queries for file-open dialogs in GNOME



commit 960f50b6afd5486f26de821504791c33426729ed
Author: Philip Van Hoof <philip codeminded be>
Date:   Tue Mar 2 14:56:15 2010 +0100

    libtracker-client: Fixed SPARQL queries for file-open dialogs in GNOME

 src/libtracker-client/tracker.c |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/src/libtracker-client/tracker.c b/src/libtracker-client/tracker.c
index 2ec5e0b..c2ad45e 100644
--- a/src/libtracker-client/tracker.c
+++ b/src/libtracker-client/tracker.c
@@ -1284,7 +1284,7 @@ tracker_search_metadata_by_text_async (TrackerClient     *client,
 	cb->data = user_data;
 	cb->client = g_object_ref (client);
 
-	sparql = g_string_new ("SELECT ?file WHERE { ?file a nfo:FileDataObject ; fts:match ");
+	sparql = g_string_new ("SELECT nie:url (?file) WHERE { ?file a nfo:FileDataObject ; fts:match ");
 	sparql_append_string_literal (sparql, query);
 	g_string_append (sparql, " }");
 
@@ -1340,9 +1340,9 @@ tracker_search_metadata_by_text_and_location_async (TrackerClient     *client,
 	cb->data = user_data;
 	cb->client = g_object_ref (client);
 
-	sparql = g_string_new ("SELECT ?file WHERE { ?file a nfo:FileDataObject ; fts:match ");
+	sparql = g_string_new ("SELECT nie:url (?file) WHERE { ?file a nfo:FileDataObject ; fts:match ");
 	sparql_append_string_literal (sparql, query);
-	g_string_append (sparql, " . FILTER (fn:starts-with(?file,");
+	g_string_append (sparql, " . FILTER (fn:starts-with(nie:url (?file),");
 	sparql_append_string_literal (sparql, location);
 	g_string_append (sparql, ")) }");
 
@@ -1401,7 +1401,7 @@ tracker_search_metadata_by_text_and_mime_async (TrackerClient      *client,
 	cb->data = user_data;
 	cb->client = g_object_ref (client);
 
-	sparql = g_string_new ("SELECT ?file WHERE { ?file a nfo:FileDataObject ; nie:mimeType ?mime ; fts:match ");
+	sparql = g_string_new ("SELECT nie:url (?file) WHERE { ?file a nfo:FileDataObject ; nie:mimeType ?mime ; fts:match ");
 	sparql_append_string_literal (sparql, query);
 	g_string_append (sparql, " . FILTER (");
 
@@ -1473,10 +1473,10 @@ tracker_search_metadata_by_text_and_mime_and_location_async (TrackerClient
 	cb->data = user_data;
 	cb->client = g_object_ref (client);
 
-	sparql = g_string_new ("SELECT ?file WHERE { ?file a nfo:FileDataObject ; nie:mimeType ?mime ; fts:match ");
+	sparql = g_string_new ("SELECT nie:url (?file) WHERE { ?file a nfo:FileDataObject ; nie:mimeType ?mime ; fts:match ");
 	sparql_append_string_literal (sparql, query);
 
-	g_string_append (sparql, " . FILTER (fn:starts-with(?file,");
+	g_string_append (sparql, " . FILTER (fn:starts-with(nie:url (?file),");
 	sparql_append_string_literal (sparql, location);
 
 	g_string_append (sparql, ")");



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