[gnome-applets/tracker-3: 1/2] tracker-search-bar: adapt the queries for Tracker 3




commit 02534d77a8055a23089b9715f04758d52c12d658
Author: Carlos Garnacho <carlosg gnome org>
Date:   Sun Jan 17 14:08:46 2021 +0100

    tracker-search-bar: adapt the queries for Tracker 3
    
    Adapt the queries so that they are meaningful on both versions,
    accounting for the differences in data layout.

 .../tracker-search-bar/tracker-results-window.c    | 25 +++++++++++++---------
 1 file changed, 15 insertions(+), 10 deletions(-)
---
diff --git a/gnome-applets/tracker-search-bar/tracker-results-window.c 
b/gnome-applets/tracker-search-bar/tracker-results-window.c
index 617754fe3..e75327ad3 100644
--- a/gnome-applets/tracker-search-bar/tracker-results-window.c
+++ b/gnome-applets/tracker-search-bar/tracker-results-window.c
@@ -37,8 +37,9 @@
        "SELECT" \
        "  ?uri ?title ?tooltip ?uri fts:rank(?urn) " \
        "WHERE {" \
-       "  ?urn a nfo:Audio ;" \
-       "  nie:url ?uri ; " \
+       "  ?content a nfo:Audio ;" \
+       "  nie:isStoredAs ?urn ." \
+       "  ?urn nie:url ?uri . " \
        "  nfo:fileName ?title ;" \
        "  nfo:belongsToContainer ?tooltip ." \
        "  ?urn fts:match \"%s*\" " \
@@ -49,8 +50,9 @@
        "SELECT" \
        "  ?uri ?title ?tooltip ?uri fts:rank(?urn) " \
        "WHERE {" \
-       "  ?urn a nfo:Image ;" \
-       "  nie:url ?uri ; " \
+       "  ?content a nfo:Image ;" \
+       "  nie:isStoredAs ?urn ." \
+       "  ?urn nie:url ?uri . " \
        "  nfo:fileName ?title ;" \
        "  nfo:belongsToContainer ?tooltip ." \
        "  ?urn fts:match \"%s*\" " \
@@ -61,8 +63,9 @@
        "SELECT" \
        "  ?uri ?title ?tooltip ?uri fts:rank(?urn) " \
        "WHERE {" \
-       "  ?urn a nmm:Video ;" \
-       "  nie:url ?uri ; " \
+       "  ?content a nmm:Video ;" \
+       "  nie:isStoredAs ?urn ." \
+       "  ?urn nie:url ?uri ; " \
        "  nfo:fileName ?title ;" \
        "  nfo:belongsToContainer ?tooltip ." \
        "  ?urn fts:match \"%s*\" " \
@@ -73,8 +76,9 @@
        "SELECT" \
        "  ?uri ?title ?tooltip ?uri fts:rank(?urn) " \
        "WHERE {" \
-       "  ?urn a nfo:Document ;" \
-       "  nie:url ?uri ; " \
+       "  ?content a nfo:Document ;" \
+       "  nie:isStoredAs ?urn ." \
+       "  ?urn nie:url ?uri ; " \
        "  nfo:fileName ?title ;" \
        "  nfo:belongsToContainer ?tooltip ." \
        "  ?urn fts:match \"%s*\" " \
@@ -85,8 +89,9 @@
        "SELECT" \
        "  ?uri ?title ?tooltip ?uri fts:rank(?urn) " \
        "WHERE {" \
-       "  ?urn a nfo:Folder ;" \
-       "  nie:url ?uri ; " \
+       "  ?content a nfo:Folder ;" \
+       "  nie:isStoredAs ?urn ." \
+       "  ?urn nie:url ?uri ; " \
        "  nfo:fileName ?title ;" \
        "  nfo:belongsToContainer ?tooltip ." \
        "  ?urn fts:match \"%s*\" " \


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