Re: [Tracker] PATCH: regular expression searching



On 7/29/06, Jamie McCracken <jamiemcc blueyonder co uk> wrote:
Samuel wrote:
> Hey again,
>
> I was wondering if you would be interested in including this patch
> into Tracker. It implements regular expression searching using MySQL's
> REGEXP, and works pretty well. Note that the patch is against 0.0.4,
> not CVS. I noticed you added startsWith support, and regex is a
> natural extension. With this included, you can do an RDF search such
> as:
>
> <rdfq:rdfquery>
>  <rdfq:From eachResource="Files">
>    <rdfq:Select>
>      <rdfq:Condition>
>        <rdfq:regex>
>          <rdfq:Property name="Audio.Title" />
>          <rdf:String>Lazy|Kid</rdf:String>
>        </rdfq:regex>
>     </rdfq:Condition>
>   </rdfq:Select>
>  </rdfq:From>
> </rdfq:rdfquery>
>
> which allows for more fine-grained control on searches.
>
> On another note, I'm also thinking about writing a tutorial on the
> Python D-Bus bindings, and once the Tracker D-Bus API stabilizes a
> bit, how to search using Tracker from Python. When you get the website
> up, I'd be glad to send it to you :-)

Thanks thats excellent. The cvs version should be usable from python now
and the cvs api/abi is now stable (at least for the next release). So
anyone doing python stuff can go ahead and use the cvs version as it
wont change for the next release.

I rewrote quite a bit of the rdf query in the cvs version to make it
more efficient in tracker-rdf-query.c

Could you be so kind as to send me a patch for the cvs version?
(if not I can cope but it might delay the release a bit which Im hoping
to do this weekend)

There's also a few interesting extensions like SoundEx in Mysql (use the
"Sounds Like" function) that could be useful for more fuzzy searches on
page http://dev.mysql.com/doc/refman/5.0/en/string-functions.html



--
Mr Jamie McCracken
http://jamiemcc.livejournal.com/



Hey, I've just made a patch against CVS. I've been having some
problems with tracker-query however, the daemon segfaults a lot, even
when using the example rdf queries. Not sure if you've looked into
this or if it's happened to you....

Attachment: tracker-regex-query.patch
Description: Text Data



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