tata 668
2009-Jan-10 17:08 UTC
[Xapian-discuss] QueryParser::parse_query() uses OR by default? How to switch to AND?
I use the QueryParser::parse_query() method but I see it uses "OR" by default between words? Is there a way to make it use "AND" instead? I see there are flags I can pass to the parse_query() method but none seems to allow a switch from OR to AND. I would like to do that without having to write my own query parser. Everything else is fine with the QueryParser parsing, for my use. Thanks in advance! Julien
James Aylett
2009-Jan-10 17:25 UTC
[Xapian-discuss] QueryParser::parse_query() uses OR by default? How to switch to AND?
On Sat, Jan 10, 2009 at 12:08:41PM -0500, tata 668 wrote:> I use the QueryParser::parse_query() method but I see it uses "OR" > by default between words? Is there a way to make it use "AND" > instead?QueryParser::set_default_op(Query.OP_AND) J -- /--------------------------------------------------------------------------\ James Aylett xapian.org james at tartarus.org uncertaintydivision.org
tata 668
2009-Jan-10 18:08 UTC
[Xapian-discuss] QueryParser::parse_query() uses OR by default? How to switch to AND?
It works great! Thanks James. James Aylett wrote:> On Sat, Jan 10, 2009 at 12:08:41PM -0500, tata 668 wrote: > >> I use the QueryParser::parse_query() method but I see it uses "OR" >> by default between words? Is there a way to make it use "AND" >> instead? > > QueryParser::set_default_op(Query.OP_AND) > > J >