lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <hossman_luc...@fucit.org>
Subject RE: Lunene 2.3-2.4 switch: Scoring change
Date Tue, 03 Feb 2009 22:47:34 GMT

: 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-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message