lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Simon Willnauer <simon.willna...@googlemail.com>
Subject Re: initial value of TopDocs#maxScore
Date Thu, 03 Feb 2011 16:21:05 GMT
On Thu, Feb 3, 2011 at 5:05 PM, Yonik Seeley <yonik@lucidimagination.com> wrote:
> On Thu, Feb 3, 2011 at 10:52 AM, Simon Willnauer
> <simon.willnauer@googlemail.com> wrote:
>> I think we should even go one step further and make NaN an illegal
>> value for maxScore. I think we should add an assert in the setter and
>> the ctor. Objections?
>
> If we don't initialize w/ NaN, maxScore will never be set to NaN, right?
> And if someone want's to explicitly call setMaxScore(NaN) for some
> reason... might as well let them?

I think an assert will not hurt here. Just thinking of a user who does
that unintentionally and we can find the issue quickly by telling them
to run with -ea?!

simon
>
> -Yonik
> http://lucidimagination.com
>

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


Mime
View raw message