Flavio Castelli

Debugging my life

Aug 31, 2007 - 2 minute read - Comments - c++ KDE strigi xesam

Strigi gains full Xesam queries support

As I said in this previous post, Strigi’s Xesam support was half-done since XesamUserSearchLanguage wasn’t yet handled. Well, this is no longer true… ;) In these weeks I’ve been working on XesamUserSearchLanguage support. Ehm… to be honest, I’ve been fighting with Bison.

But in the end I tamed the beast and now Xesam support in Strigi is full.

IMHO XesamUserSearchLanguage can be considered more important than XesamQueryLanguage since common users will write queries in this way.

As reported on the project page: {% blockquote %} It is [XesamUserSearchLanguage] designed as an extended synthesis of Apple’s spotlight and Google’s search languages. {% endblockquote %}

These are some possible queries (examples taken from freedesktop site):

  • _type:music hendrix_ will return all music items related to hendrix
  • _type:image size>=1mb tag:flower africa_ will return all pictures displaying a flower greater than 1 Mb and related with africa

Technical aspects

The Xesam’s UserSearchLanguage query –> Strigi::Query object conversion is made using a hand-written scanner and a C++ parser created by Bison.

You don’t have to worry if you don’t have Bison installed on your system since all parser generated code is already put into svn. In these days, as soon as I’ll have some spare time (when?!), I’ll write another post about open-source scanner and parser generators.

By now I would like to thank Andreas Pakulat (developer of KDevelop) for his help with parser generators.

Xesam and bathroom hacking Howto use Git and svn together

comments powered by Disqus