: To get the normalized scores use: ... : float score = hits[1].score / td.getMaxScore();
Strictly speaking, this code will not return the exact same scores as the deprecated Hits API. the Hits class only normalizes the scores if the max score is greater then 1.0f (yet another one of the marvolously unexpected and hard to explain nuances of Hits that make me happy to say goodbye to it) : > I have project which I am trying to switch from lucene 2.3.2 to 2.4 I am : > getting some strange scores : > : > Before my code was: : > : > Hits hits= searcher.search(query); ... -Hoss --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org For additional commands, e-mail: java-user-h...@lucene.apache.org