[grilo-plugins] tracker: Eliminate duplicate search results



commit e1a233da573b6c2b120fc874268327ae44b2d371
Author: Philip Withnall <philip withnall collabora co uk>
Date:   Mon Apr 27 17:56:57 2015 +0100

    tracker: Eliminate duplicate search results
    
    Add a DISTINCT to the query to eliminate duplicate search results when
    using grl_source_browse() on a grl-tracker source. Unlike other uses of
    DISTINCT in the source, it is not conditional on the browse-filesystem
    config key being enabled.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=748539

 src/tracker/grl-tracker-source-api.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/tracker/grl-tracker-source-api.c b/src/tracker/grl-tracker-source-api.c
index 746ed13..959b381 100644
--- a/src/tracker/grl-tracker-source-api.c
+++ b/src/tracker/grl-tracker-source-api.c
@@ -72,7 +72,7 @@ GRL_LOG_DOMAIN_STATIC(tracker_source_result_log_domain);
   TRACKER_QUERY_LIMIT
 
 #define TRACKER_SEARCH_REQUEST                  \
-  "SELECT rdf:type(?urn) %s "                   \
+  "SELECT DISTINCT rdf:type(?urn) %s "          \
   "WHERE "                                      \
   "{ "                                          \
   "%s "                                         \
@@ -85,7 +85,7 @@ GRL_LOG_DOMAIN_STATIC(tracker_source_result_log_domain);
   "LIMIT %u"
 
 #define TRACKER_SEARCH_ALL_REQUEST              \
-  "SELECT rdf:type(?urn) %s "                   \
+  "SELECT DISTINCT rdf:type(?urn) %s "          \
   "WHERE "                                      \
   "{ "                                          \
   "%s "                                         \


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