Re: [Tracker] search query syntax




On Sun, 2010-05-02 at 15:49 -0300, Zoho Vignochi wrote:

snip
As a bit of explanation: every file i save in my home directory gets 3
parts. 
     1. yyyy-mm-dd the file was saved
     2. alphanumeric code indicating content. example N3, P1, R5 
     3. a unique identifier name

so all my files look like this:

2010-05-01-N5-Lorem ipsum dolor sit amet.pdf
2008-03-02-R1-consectetur adipisicing elit.txt
2010-05-01-T3-ullamco laboris nisi ut aliquip.odt
snip

What exact queries are you using?

After reading the links you pointed me to it seems that I can use REGEX to
query tracker. I am trying to use REGEX to match on the file names. I am
not at the moment interested in searching the content of the files.

So to find all my pdfs I used the REGEX search pattern:

tracker-search .*.pdf$

and i got 341 results, all of which were pdfs. so far so good. To find
all my .txt files (that is files ending with the txt file extension) i
used:

tracker-search .*.txt$

and got 138 results. This however did not return only the files ending
with txt but also some (but not all) files ending in .py. 

When trying to get *both* the .txt and .pdf files i tried two
different approaches. The first using the REGEX '|' and the second using
the tracker-search -r flag:

tracker-search '.*.(pdf|txt)$'
tracker-search -r .*.pdf$ .*.txt$ 

i got 14 and 445 respectively. I expected the same result from both.

So my questions are:
1. is this the correct mailing list to post these questions? 
2. can tracker-search understand REGEX directly or should i be using
tracker-sparql instead?

Thank you for your time,

Zoho



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