Re: [Tracker] How to search on matching multiple tags (DC:Keywords)?



Jamie,

I wrote a C client using the tracker_keywords_search() function in
libtracker, and I passed in an array of two words {"first", "second"}
and it returns results of either first or second, but not only those
with both.  Is this a bug?

Can you show me the equivalent SQL query for searching the Sqlite3
database instead using keywords?

like

select filepath from database
where keywords contains "first"
and keywords contains "second"

Sorry, I am not database expert here.

Jimmy

On Wed, 2008-07-23 at 17:37 -0400, Jamie McCracken wrote:
On Wed, 2008-07-23 at 14:26 -0700, Jimmy Huang wrote:
Jamie,

Maybe I didn't describe it clearly.  tracker-tag -s first -s second will
return the files that match either "first" or "second", so basically a
union of the two.  I want just the files that contains both tags, an
intersection of A and B.  So the each result will contain both tag
"first" and "second".


ok thats a bug

Is there a way to do this?

should be - see search method in the keywords dbus interface. It takes
keywords to search on as an array of string

jamie





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