lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael McCandless <luc...@mikemccandless.com>
Subject Re: initial value of TopDocs#maxScore
Date Thu, 03 Feb 2011 15:12:21 GMT
I think Float.NEG_INF is good?

Mike

On Thu, Feb 3, 2011 at 4:26 AM, Simon Willnauer
<simon.willnauer@googlemail.com> wrote:
> 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
>
>

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


Mime
View raw message