Re: question about code in FunctionQuery#score

2009-06-08 Thread Yonik Seeley
Now that I'm thinking about it... we can do better by exploiting the fact that comparisons to NaN are always false. This should check for both NaN and negative infinity in a single comparison, right? if (!(score > Float.NEGATIVE_INFINITY)) This is inner loop stuff - probably worth the change (al

Re: question about code in FunctionQuery#score

2009-06-08 Thread Mark Miller
Yonik Seeley wrote: On Mon, Jun 8, 2009 at 9:38 AM, Mark Miller 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 :-) Well I knew it was your work, so I had a sneaky suspicion

Re: question about code in FunctionQuery#score

2009-06-08 Thread Yonik Seeley
On Mon, Jun 8, 2009 at 9:38 AM, Mark Miller 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

question about code in FunctionQuery#score

2009-06-08 Thread Mark Miller
We have score!=score (same variable) - just wondering what that was trying to accomplish, or whether it can just be dropped. 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 mista