lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yonik Seeley (JIRA)" <>
Subject [jira] Commented: (LUCENE-901) DefaultSimilarity.queryNorm() should never return Infinity
Date Fri, 01 Jun 2007 14:23:15 GMT


Yonik Seeley commented on LUCENE-901:

>From a scoring perspective, it's a multiplier that's only used at the top level, so the
scores produced will be zero anyway.  How else might Similarity.queryNorm() be used?

If the user uses a boost of zero, It doesn't make sense to try and normalize that upwards
though.  Returning 0 could also make sense.

> DefaultSimilarity.queryNorm() should never return Infinity
> ----------------------------------------------------------
>                 Key: LUCENE-901
>                 URL:
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: Search
>            Reporter: Michael Busch
>            Priority: Trivial
> Currently DefaultSimilarity.queryNorm() returns Infinity if sumOfSquaredWeights=0.
> This can result in a score of NaN (e. g. in TermScorer) if boost=0.0f.
> A simple fix would be to return 1.0f in case zero is passed in.
> See LUCENE-698 for discussions about this.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message