You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by bu...@apache.org on 2004/11/14 17:01:02 UTC
DO NOT REPLY [Bug 32234] New: -
queryParser.setOperator(int) should be made typesafe
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=32234>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=32234
queryParser.setOperator(int) should be made typesafe
Summary: queryParser.setOperator(int) should be made typesafe
Product: Lucene
Version: CVS Nightly - Specify date in submission
Platform: Other
OS/Version: Other
Status: NEW
Severity: Normal
Priority: Other
Component: QueryParser
AssignedTo: lucene-dev@jakarta.apache.org
ReportedBy: daniel.naber@t-online.de
There are AND and DEFAULT_OPERATOR_AND in QueryParser, so calling
setOperator(QueryParser.AND) looks okay and compiles, but it's not correct.
I'll attach a patch that uses a typesafe enum to avoid this problem. As
there's also a getOperator method I had to change the name of the new method
to get/setDefaultOperator. I don't like that, but it seems to be the only way
to avoid compile errors for people who switch to a new version of Lucene.
Okay to commit?
---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-dev-help@jakarta.apache.org