[tracker] libtracker-miner: Lower the expectations in TrackerFileNotifier sparql queries



commit 3bd2c82e7763050cc81a5a541126005e7ee8c0c5
Author: Carlos Garnacho <carlos lanedo com>
Date:   Fri Dec 9 13:09:30 2011 +0100

    libtracker-miner: Lower the expectations in TrackerFileNotifier sparql queries
    
    Do not query for nfo:FileDataObjects, sparql preemptively added by applications
    could not be that complete, turning into inaccurate results. So settle for with
    nie:DataObject, which is a lower common denominator.

 src/libtracker-miner/tracker-file-notifier.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/libtracker-miner/tracker-file-notifier.c b/src/libtracker-miner/tracker-file-notifier.c
index 0c4d7a5..f1a8e3b 100644
--- a/src/libtracker-miner/tracker-file-notifier.c
+++ b/src/libtracker-miner/tracker-file-notifier.c
@@ -490,7 +490,7 @@ sparql_file_query_start (TrackerFileNotifier *notifier,
 		if (recursive) {
 			sparql = g_strdup_printf ("select ?url ?u nfo:fileLastModified(?u) "
 			                          "where {"
-			                          "  ?u a nfo:FileDataObject ; "
+			                          "  ?u a nie:DataObject ; "
 			                          "     nie:url ?url . "
 			                          "  FILTER (?url = \"%s\" || "
 			                          "          fn:starts-with (?url, \"%s/\")) "
@@ -498,7 +498,7 @@ sparql_file_query_start (TrackerFileNotifier *notifier,
 		} else {
 			sparql = g_strdup_printf ("select ?url ?u nfo:fileLastModified(?u) "
 			                          "where { "
-			                          "  ?u a nfo:FileDataObject ; "
+			                          "  ?u a nie:DataObject ; "
 			                          "     nie:url ?url . "
 			                          "  OPTIONAL { ?u nfo:belongsToContainer ?p } . "
 			                          "  FILTER (?url = \"%s\" || "
@@ -509,7 +509,7 @@ sparql_file_query_start (TrackerFileNotifier *notifier,
 		/* If it's a regular file, only query this item */
 		sparql = g_strdup_printf ("select ?url ?u nfo:fileLastModified(?u) "
 		                          "where { "
-		                          "  ?u a nfo:FileDataObject ; "
+		                          "  ?u a nie:DataObject ; "
 		                          "     nie:url ?url ; "
 		                          "     nie:url \"%s\" . "
 		                          "}", uri);



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