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... ------- Additional Comments From [EMAIL PROTECTED] 2001-10-24 11:45 ------- The way boosts are currently implemented, I actually don't think that this will work. The boosts are squared in TermQuery.sumOfSquaredWeights(), which loses their negativeness, no? And as you've reported separately, zeroed weights don't do what you want either. Can you try changing that method so that boosts are not multiplied in until after the query is normalized? Tell me if that makes things work any better for you. final float sumOfSquaredWeights(Searcher searcher) throws IOException { - idf = Similarity.idf(term, searcher); - weight = idf * boost; + weight = idf = Similarity.idf(term, searcher); return weight * weight; // square term weights } final void normalize(float norm) { weight *= norm; // normalize for query weight *= idf; // factor from document + weight *= boost; // boost query }
