[tracker/miner-fs-queries-performance: 6/6] TrackerMinerFS: Make mtime/iri caches query per folder through tracker:uri-dirname().



commit 08e59e23d97aa7e266be4df66d391c3ecc155667
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-dirname().

 src/libtracker-miner/tracker-miner-fs.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/libtracker-miner/tracker-miner-fs.c b/src/libtracker-miner/tracker-miner-fs.c
index 6effe49..c9ee1b4 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-dirname(?uri) = \"%s\") "
 	                         "}",
 	                         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-dirname (?uri) = \"%s\") "
 	                         "}",
 	                         slash_uri);
 



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