Re: [Tracker] search match on substrings



On Mon, 2013-11-04 at 13:51 +0000, Martyn Russell wrote:

Yep. Something like this does that job:

$ tracker-sparql -q "select nie:url(?p) nie:url(?f) where { ?f a 
nfo:FileDataObject ; nfo:belongsToContainer ?p ; fts:match 'BY OR LAW'. 
FILTER(fn:starts-with(nie:url(?p),'file:///home/user/Documents')) } 
ORDER BY ASC nie:url(?p) LIMIT 5"

Yeah, that's pretty sweet.  Would be nice to add the ability to search
in an "nfo:belongsToContainer" to the tracker-search/needle search
syntax.  Maybe something along the lines of google's "site:" but
"location:" instead perhaps.  Adding google's generalized +/- syntax
would be sweet too.

But back to this thread, maybe an easier way for me to achieve my goal
is to see what is in the index for any given file.  Is there a way to
query the database for that?  i.e. "show me all of the words indexed for
document file:///foo/bar.pdf"
...
For plain text content, you will need to use:

$ tracker-info -c $URN

Very nice!

Cheers,
b.

Attachment: signature.asc
Description: This is a digitally signed message part



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