[tracker/tracker-0.8] TrackerMinerFS: Make mtime/iri caches query per folder through tracker:uri-is-*().



commit 3a844fe56ad34721a4b51dd985b88ddecebb94a5
Author: Carlos Garnacho <carlosg gnome org>
Date:   Wed Apr 21 15:38:37 2010 +0200

    TrackerMinerFS: Make mtime/iri caches query per folder through tracker:uri-is-*().
    
    Also, the query to get all children on directory moving is done through tracker:uri-is-descendant().

 src/libtracker-miner/tracker-miner-fs.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/libtracker-miner/tracker-miner-fs.c b/src/libtracker-miner/tracker-miner-fs.c
index 6effe49..82e5da1 100644
--- a/src/libtracker-miner/tracker-miner-fs.c
+++ b/src/libtracker-miner/tracker-miner-fs.c
@@ -1103,7 +1103,7 @@ cache_query_cb (GObject	     *object,
 	g_main_loop_quit (data->main_loop);
 
 	if (G_UNLIKELY (error)) {
-		g_critical ("Could not query mtimes: %s\n", error->message);
+		g_critical ("Could not execute cache query: %s\n", error->message);
 		g_error_free (error);
 		return;
 	}
@@ -1141,7 +1141,7 @@ ensure_iri_cache (TrackerMinerFS *fs,
 
 	query = g_strdup_printf ("SELECT ?uri ?u { "
 	                         "  ?u nie:url ?uri . "
-	                         "  FILTER (fn:starts-with (?uri, \"%s\")) "
+	                         "  FILTER (tracker:uri-is-parent (\"%s\", ?uri)) "
 	                         "}",
 	                         slash_uri);
 
@@ -1605,7 +1605,7 @@ item_update_children_uri (TrackerMinerFS    *fs,
 
 	sparql = g_strdup_printf ("SELECT ?child ?url nie:mimeType(?child) WHERE { "
 				  "  ?child nie:url ?url . "
-				  "  FILTER (fn:starts-with (?url, \"%s\")) "
+                                  "  FILTER (tracker:uri-is-descendant (\"%s\", ?uri)) "
 				  "}",
 				  slash_uri);
 
@@ -2209,7 +2209,7 @@ ensure_mtime_cache (TrackerMinerFS *fs,
 	query = g_strdup_printf ("SELECT ?uri ?time { "
 	                         "  ?u nfo:fileLastModified ?time ; "
 	                         "     nie:url ?uri . "
-	                         "  FILTER (fn:starts-with (?uri, \"%s\")) "
+	                         "  FILTER (tracker:uri-is-parent (\"%s\", ?uri)) "
 	                         "}",
 	                         slash_uri);
 



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