[KinoSearch] get_score == nan
marvin at rectangular.com
Tue Apr 6 11:20:05 PDT 2010
On Tue, Apr 06, 2010 at 11:56:56AM -0500, Peter Karman wrote:
> Is there any legitimate way that $hitdoc->get_score would return a value
> that Perl stringifies to 'nan'?
When using a SortSpec that doesn't include scoring, yes. In that case,
SortCollector assigns 'nan' to the MatchDoc score member and it never gets
overwritten with a real value. We optimize the "score not needed" case and
avoid the cost of calculating scores.
Otherwise, that's unexpected.
> I am getting that value in some cases.
> I see in the core code that score is a float. Could there be a type mismatch
> where the C code has more precision than the Perl and Perl is unable to
> stringify the float?
I doubt that's the root of the problem. In any case, Perl NV SVs use doubles,
so our single precision float scores shouldn't be overflowing.
More information about the kinosearch