[Xapian-discuss] Re: Possible bug with multiple prefixed and quoted terms?

Mike Hsu mhsu at freeshell.org
Wed Jul 12 06:04:25 BST 2006


Olly Betts <olly <at> survex.com> writes:

> 
> On Tue, Jul 11, 2006 at 02:02:17PM +0000, Mike Hsu wrote:
> > $ ./omega 'P=author:"mencken, h.l."'
> > Xapian::Query((author:(pos=1) OR mencken:(pos=2) OR (h:(pos=3) PHRASE 2
> > l:(pos=4))))
> 
> Looks like I broke this with the previous change.  Try these:
> 
> http://www.oligarchy.co.uk/xapian/patches/queryparser_internal.cc
> http://www.oligarchy.co.uk/xapian/patches/queryparser_token.h
> 
> If you've got a set of tests cases, I can add them to the
> queryparsertest easily.  It has fairly good general coverage but
> there are corner cases which aren't covered (like the one above).
> 
> Cheers,
>     Olly
> 

That seems to work, thanks.  My tests were pretty much what I put in the
previous posts, but here's approximately the same thing, for queryparsertest.cc:

35a36,38
>     { "author:\"mike\" title:(foo)", "(Amike:(pos=1) OR XTfoo:(pos=2))" },
>     { "author:\"mike\" title:\"foo bar\"", "(Amike:(pos=1) OR (XTfoo:(pos=2)
PHRASE 2 XTbar:(pos=3)))" },
>     { "author:\"freely, i.p.\"", "(Afreeli:(pos=1) PHRASE 3 Ai:(pos=2) PHRASE
3 Ap:(pos=3))" },

Mike






More information about the Xapian-discuss mailing list