Mike Hsu
2006-Jul-11 01:13 UTC
[Xapian-discuss] Possible bug with multiple prefixed and quoted terms?
Hi all,
I'm running into some strange behavior when I submit a query involving
multiple P-terms that have prefixes and are double-quoted. For example:
I have an Omega template containing the following:
$setmap{prefix,author,A}
$setmap{prefix,title,S}
$html{$querydescription}
Omega is using qp.FLAG_PHRASE | qp.FLAG_BOOLEAN
If I submit a query with a single quoted term, it parses fine:
$ ./omega 'P=author:"mike"'
Xapian::Query(Amike:(pos=1))
$ ./omega 'P=title:"foo"'
Xapian::Query(Sfoo:(pos=1))
But if I submit a query with multiple quoted terms, it gives the same prefix
to all of them:
$ ./omega 'P=author:"mike"' 'P=title:"foo"'
Xapian::Query((Amike:(pos=1) OR Afoo:(pos=2)))
Note that if only one item is double-quoted, it parses as expected:
$ ./omega 'P=author:"mike"' 'P=title:foo'
Xapian::Query((Amike:(pos=1) OR Sfoo:(pos=2)))
Any ideas?
Olly Betts
2006-Jul-11 02:10 UTC
[Xapian-discuss] Possible bug with multiple prefixed and quoted terms?
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. Cheers, Olly