> I've been making local changes to QueryParser to fix the operator
> precedence issues (i.e. currently A AND B OR C AND D parses to +A +B +C
I had a quick look at the new QP. I didn't look at the code yet, but I
redid my patch at the weekend for the current code, and I found it quite
ugly ;-) I didn't finish it completely, so I didn't upload it to
Your changes look great in general, though I find some issues:
1) 'stop OR stop AND stop' where stop is a stopword gives a parse error:
Encountered "<EOF>" at line 1, column 0.
Was expecting one of:
2) Single term queries using +/- flags are parse to a query without flag
+a -> a
-a -> a
While this doesn't make a difference for +a it's a bit strange for -a,
OTOH -a isn't a usable query anyway.
3) a OR NOT b parses to 'a -b' which is the same as 'a AND NOT b'
IMHO `a OR NOT b' should be `a OR (NOT b)' though lucene cannot search
that. Maybe it should raise an error...
a OR NOT b AND c (parsed to a -(+b +c)) should IMHO be parsed to `a (-b +c)'