On Mon, Jun 8, 2009 at 9:38 AM, Mark Miller <[email protected]> wrote: > We have score!=score (same variable) - just wondering what that was trying > to accomplish, or whether it can just be dropped.
Good thing you checked :-) > Its also in BoostedQuery, > so it almost seems on purpose. Even with a float, score has got to equal > score, right? Is this some tricky check I don't understand, or a mistake? The purpose is alluded to in the comments. If a var is NaN (not a number) it doesn't even compare equal to itself. -Yonik http://www.lucidimagination.com > // current Lucene sorting priority queues can't handle NaN and -Infinity > if (score != score || score==Float.NEGATIVE_INFINITY) return > -Float.MAX_VALUE; > return score; > }
