[tracker] tracker-needle: Use nco:publisher if nco:creator is not available for documents



commit ca55f979845f887344d98b2496067a623386d773
Author: Martyn Russell <martyn lanedo com>
Date:   Fri Dec 31 17:28:36 2010 +0000

    tracker-needle: Use nco:publisher if nco:creator is not available for documents

 src/tracker-needle/tracker-query.vala |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/src/tracker-needle/tracker-query.vala b/src/tracker-needle/tracker-query.vala
index 1bf8d6d..d3e4d0a 100644
--- a/src/tracker-needle/tracker-query.vala
+++ b/src/tracker-needle/tracker-query.vala
@@ -167,14 +167,19 @@ public class Tracker.Query {
 			          ?urn 
 			          nie:url(?urn) 
 			          tracker:coalesce(nie:title(?urn), nfo:fileName(?urn), \"Unknown\") 
-			          ?creator
+			          tracker:coalesce(nco:fullname(?creator), nco:fullname(?publisher), \"\")
 			          fn:concat(nfo:pageCount(?urn), \" $pages\")
 			          ?tooltip
 			        WHERE {
 			          ?urn a nfo:Document ;
-			          nco:creator [ nco:fullname ?creator ] ;
 			          nie:url ?tooltip ;
 			          fts:match \"$criteria_escaped\" .
+			          OPTIONAL {
+			            ?urn nco:creator ?creator .
+			          }
+			          OPTIONAL {
+			            ?urn nco:publisher ?publisher .
+			          }
 			        }
 			        ORDER BY DESC(fts:rank(?urn)) DESC(nie:title(?urn)) 
 			        OFFSET $offset LIMIT $limit



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