[Xapian-discuss] QueryParser question

Rich Lane
Mon, 07 Sep 2009 23:50:14 -0000

Hi,

I'm using Xapian to index emails for the Sup mail client project. One of
our users reported that searching for messages with a query like
"label:foo label:starred" resulted in the union of all messages with
the
labels 'foo' and 'starred', not the intersection. This was
surprising
because the default_op in our QueryParser instance is set to OP_AND, so
combining a label and another field in a query would result in the
intersection. I found http://trac.xapian.org/ticket/157 which explains
this behavior.

Is there a simple way to work around this (besides requiring users to
explicitly type 'AND')?

Thanks,
Rich