: Here is a version of the QueryParser that can "understand" the AND, OR
: and NOT keyword in other languages.

I finally got a chance to skim this ... i don't know a lot about javaCC or
ResourceBundles, but this looks really cool to me.  Mainly because it
looks like this would make it really easy to completley disable the use of
"AND" "OR" and "NOT" as well -- so they can be treated as regular terms
(at the moment there is no way to "escape" them) by directly modify
andCases, orCases, and notCases (in a subclass, or through new methods)

        ...except...

...I don't see anything in the patch that would eliminate the use of "AND"
to mean *AND* if a ResourceBundle is used ... are the English operators
still in effect when the ResourceBundle operators are specified?


That is on purpose, for now. The idea was to introduce a new functionnality
without changing the way things worked before. But yes, it would be possible
to make it so that, if wanted, the English operators could be "disabled".

Also: i noticed you used ResourceBundle.getString for each of the keys,
and then put it in a single element ArrayList .. why not use
ResourceBundle.getStringArray so that the bundle can define multiple words
to foreach operator?  (note: we'd probably want to put them in a Set at
that point)

Interesting idea.

Give me a few days, I'll take the time to submit a new version of the patch
with the suggested enhancements.

Patrick Turcotte

Reply via email to