[Tracker] Some questions



Hi, I'm writing a simple search tool for personal use (using tracker
0.6.93) and I've got a few problems:

* I wanted to search for files which path or name contains a given
keyword (not only for full word, for example searching for trac should
return files like /home/user/tracker or /home/user/tracker.cfg). I did
this successfully with tracker_search_query, but after that I wanted to
search that keyword in tags too, and I couldn't manage to make it work.
Here is the query I'm using:
<rdfq:Condition>
 <rdfq:or>
  <rdfq:inSet>
   <rdfq:Property name='User:Keywords' />
   <rdf:String>KEYWORD</rdf:String>
  </rdfq:inSet>
  <rdfq:contains>
   <rdfq:Property name='File:NameDelimited' />
   <rdf:String>KEYWORD</rdf:String>
  </rdfq:contains>
 </rdfq:or>
</rdfq:Condition>

The problem is that the query won't return files that have not got a
tag, even if the other condition is met (for example if KEYWORD is
"foobar" and I've got a file called /home/user/foobar.txt, it won't be
returned by query if that file has got no tags, but if I add a tag it
will be).
is there any way to make that query work as expected?


* I gave up with that rdf query and I've tried instead to specify a full
text search parameter in tracker_search_query (the parameter called
search_text), however it seems that it does not search in the tags (for
example searching for "foobar" does not return files tagged "foobar").
I've noticed that tracker-search-tool doesn't too, since when clicking
on a tag it searches for that tag returning no results I guess this is a
bug.

* in tracker_search_query the search_text and sort_fields parameters
don't seem to work well together, when specifying both I always get zero
matches. specifying only search text, only sort_fields, or sort_fields
together with an rdf query works as expected.


that's all I wanted to ask for now, I hope I could explain well my
questions.

Thank you for reading this and for your great work on tracker!





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