Hi Erik, > 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 > +D). > 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 bugzilla yet.
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: <NOT> ... ... 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)' Thanks for your effort, Morus --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]