lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Simon Willnauer <simon.willna...@googlemail.com>
Subject initial value of TopDocs#maxScore
Date Thu, 03 Feb 2011 09:26:08 GMT
Hey folks,

we had some issues / test failure with the newSearcher due to the
initial value of TopDocs#maxScore. It is initialized to NaN which
outrules anything if we do Math.max(current, topDocs.getMaxScore());
and topDocs.totalHits == 0. I added a conditional  as a quickfix but I
think we should really change the default value to
Float.NEGATIVE_INFINITY instead to prevent the stupid conditionals. I
could imagine that there are some implications here which I don't see
yet. Thoughts?

simon

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message