diff options
author | Carlos Garnacho <carlosg@gnome.org> | 2018-09-09 12:18:14 +0200 |
---|---|---|
committer | Carlos Garnacho <carlosg@gnome.org> | 2018-09-09 13:29:31 +0200 |
commit | 1e846a13f39189c7244f6d203c561eb97e868dac (patch) | |
tree | cc31426c95382fa126ea4a731f1bfb9ca900f393 | |
parent | ff36b9129e813b1354286e51e2ec629dbe794ea6 (diff) | |
download | tracker-1e846a13f39189c7244f6d203c561eb97e868dac.tar.gz |
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.
-rw-r--r-- | src/libtracker-miner/tracker-decorator.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libtracker-miner/tracker-decorator.c b/src/libtracker-miner/tracker-decorator.c index 2c171a38a..ba8b335b3 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); } |