[tracker/tracker-needle-model] needle: rewrite the "all" and "all in titles" query clauses
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/tracker-needle-model] needle: rewrite the "all" and "all in titles" query clauses
- Date: Tue, 22 Mar 2011 15:03:32 +0000 (UTC)
commit 2a2d7cf083a4de9302970f15796dcf233bd2fa87
Author: Carlos Garnacho <carlosg gnome org>
Date: Tue Mar 22 15:56:52 2011 +0100
needle: rewrite the "all" and "all in titles" query clauses
?urn should be exposed as such to be consistent.
src/tracker-needle/tracker-query.vala | 14 ++++++++++++--
1 files changed, 12 insertions(+), 2 deletions(-)
---
diff --git a/src/tracker-needle/tracker-query.vala b/src/tracker-needle/tracker-query.vala
index 97a167b..399b492 100644
--- a/src/tracker-needle/tracker-query.vala
+++ b/src/tracker-needle/tracker-query.vala
@@ -36,10 +36,20 @@ public class Tracker.Query {
private string [] where_clauses = {
// ALL
- "WHERE { ?u fts:match \"%s\" . ?u nfo:belongsToContainer ?c ; tracker:available true . }",
+ "WHERE {
+ ?urn fts:match \"%s\" ;
+ nfo:belongsToContainer ?parent ;
+ tracker:available true .
+ }",
// ALL_ONLY_IN_TITLES
- "WHERE { ?u a nfo:FileDataObject ; nfo:belongsToContainer ?c ; tracker:available true . FILTER(fn:contains(fn:lower-case(nfo:fileName(?u)), \"$criteria_escaped_down\")) }",
+ "WHERE {
+ ?urn a nfo:FileDataObject ;
+ nfo:belongsToContainer ?parent ;
+ tracker:available true .
+ FILTER (fn:contains (fn:lower-case (nfo:fileName(?urn)), \"%s\"))
+ }",
+
// CONTACTS
"",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]