DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4254>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4254 QueryParser does not recognized negative numbers... Summary: QueryParser does not recognized negative numbers... Product: Lucene Version: CVS Nightly - Specify date in submission Platform: All OS/Version: Other Status: NEW Severity: Major Priority: Other Component: QueryParser AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] The TermQuery allows .setBost to set a float multiplier. The boost is entered via a '^'<NUMBER> format in the String query, however, while .setBoost will take a negative number, the parser does not allow negative numbers due to the limited description of the <NUMBER> token (QueryParser.jj): | <NUMBER: (<_NUM_CHAR>)+ "." (<_NUM_CHAR>)+ > The solution is to allow + or - as in: | <NUMBER: (["+","-"])? (<_NUM_CHAR>)+ "." (<_NUM_CHAR>)+ > This works correctly, properly reading negative numbers. I have done some simple tests, and negative boost seems to work as expected, by moving the entry to the end of the list.
