[Xapian-discuss] Request for enhancement

Olly Betts olly at survex.com
Fri Aug 25 00:08:53 BST 2006


On Mon, Jul 31, 2006 at 08:18:12AM -0400, Jim Lynch wrote:
> If there is such a thing as a wish list, I'd like to ask that a variable 
> proximity search option be included with omega.

You could file a bug with severity "enhancement".

> cats NEAR 5 dogs
> 
> Where NEAR permits a word proximity value.

It's not too hard to achieve this - Xapian::Query supports it, so it's
just the QueryParser which needs to be taught to understand it.

> I attempted to modify omega/xapian to do so but got hopelessly lost in 
> understanding the lemmony object and how it works WRT c++.

"lemon" is a parser generator.  Like bison and yacc, with the major
difference being that the lexer calls the parser in lemon which makes
it much easier to write your lexer without needing global state.  It
has some other nice features too - I'm suprised it's not more widely
used really.  We originally used bison, and the lemon version is both
noticeably smaller and easier to understand than the bison one was.

There's documentation for lemon here:

http://www.hwaci.com/sw/lemon/

queryparser.lemony is processed by lemon to produce
queryparser_internal.cc (there doesn't seem to be a standard extension
so I picked .lemony somewhat arbitrarily).

Cheers,
    Olly



More information about the Xapian-discuss mailing list