[Xapian-tickets] [Xapian] #447: QueryParser: Confusion with Boolean operator and -.
Xapian
nobody at xapian.org
Fri Feb 12 11:31:10 GMT 2010
#447: QueryParser: Confusion with Boolean operator and -.
-------------------------+--------------------------------------------------
Reporter: cworth | Owner: olly
Type: defect | Status: assigned
Priority: normal | Milestone: 1.2.x
Component: QueryParser | Version: 1.1.3
Severity: normal | Keywords:
Blockedby: | Platform: All
Blocking: |
-------------------------+--------------------------------------------------
Changes (by olly):
* status: new => assigned
* component: Other => QueryParser
* milestone: => 1.2.x
Comment:
{{{
a AND -foo:b
}}}
This is currently a syntax error, so the !QueryParser switches to a fall
back mode of parsing it without boolean operators, love, or hate enabled.
That certainly isn't helpful in this case.
As a workaround, you can use this query instead, since AND is implicit for
filters:
{{{
a -foo:b
}}}
I've attached a patch, but although it's simple, the implications of it
aren't so clear. It seems to fix this case, and the changes it makes to
the parsing of existing testcases look like they are just different
representations with the same meaning, so it's probably OK, and I'd like
to hear if it works for you.
Marking for 1.2.x for now, as this doesn't require ABI or API changes.
--
Ticket URL: <http://trac.xapian.org/ticket/447#comment:2>
Xapian <http://xapian.org/>
Xapian
More information about the Xapian-tickets
mailing list