[Xapian-discuss] Re: Possible bug with multiple prefixed and
quoted terms?
Mike Hsu
mhsu at freeshell.org
Tue Jul 11 06:25:49 BST 2006
Olly Betts <olly <at> survex.com> writes:
>
> On Tue, Jul 11, 2006 at 02:10:15AM +0100, Olly Betts wrote:
> > On Tue, Jul 11, 2006 at 12:12:56AM +0000, Mike Hsu wrote:
> > > $ ./omega 'P=author:"mike"' 'P=title:"foo"'
> > > Xapian::Query((Amike:(pos=1) OR Afoo:(pos=2)))
> >
> > It's a bug in the QueryParser. I'll need to investigate as I can't
> > immediately see what's causing it.
>
> OK, I think I've nailed it, and also this case which misbehaves in a
> similar way:
>
> author:(mike) title:(foo)
>
> Can you replace 0.9.6's queryparser/queryparser_internal.cc with this
> version:
>
> http://www.oligarchy.co.uk/xapian/patches/queryparser_internal.cc
>
> And confirm that fixes the bug for you?
>
> (It's a generated file and the patch isn't much smaller than the whole
> file so I just stuck the whole file there.)
>
> Cheers,
> Olly
>
Hi Olly,
This patch doesn't seem to be working for me. The substitutions appear to fail
when anything is quoted or grouped.
$ ./omega 'P=author:foo'
Xapian::Query(Afoo:(pos=1))
$ ./omega 'P=author:(foo)'
Xapian::Query((author:(pos=1) OR foo:(pos=2)))
$ ./omega 'P=author:"foo"'
Xapian::Query((author:(pos=1) OR foo:(pos=2)))
$ ./omega 'P=author:"foo"' 'P=title:"mike"'
Xapian::Query((author:(pos=1) OR foo:(pos=2) OR titl:(pos=3) OR mike:(pos=4)))
More information about the Xapian-discuss
mailing list