[Xapian-discuss] QueryParser question

Rich Lane rlane at club.cc.cmu.edu
Tue Sep 8 00:50:14 BST 2009


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



More information about the Xapian-discuss mailing list