[tracker-miners/wip/carlosg/shuffle-libtracker-miner: 81/116] libtracker-miner: group elements on tracker_decorator_next() query
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker-miners/wip/carlosg/shuffle-libtracker-miner: 81/116] libtracker-miner: group elements on tracker_decorator_next() query
- Date: Sat, 14 Dec 2019 16:21:37 +0000 (UTC)
commit e7a4972bc9a46df220ce68179a7ec24916802f8e
Author: Carlos Garnacho <carlosg gnome org>
Date: Sun Sep 9 12:18:14 2018 +0200
libtracker-miner: group elements on tracker_decorator_next() query
This query would deduplicate files by their matching rdf:types, which
may possibly return the same file multiple types if the file as
several types that satisfy the query. Group by the URN so we only get
each element exactly once.
src/libtracker-miner/tracker-decorator.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/libtracker-miner/tracker-decorator.c b/src/libtracker-miner/tracker-decorator.c
index 2ec396d59..e8948f79f 100644
--- a/src/libtracker-miner/tracker-decorator.c
+++ b/src/libtracker-miner/tracker-decorator.c
@@ -758,7 +758,7 @@ create_query_string (TrackerDecorator *decorator,
prev = cur;
}
- g_string_append_printf (query, "))}}} LIMIT %d", QUERY_BATCH_SIZE);
+ g_string_append_printf (query, "))}} GROUP BY ?urn } LIMIT %d", QUERY_BATCH_SIZE);
return g_string_free (query, FALSE);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]