You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Francisco Borges <fr...@gmail.com> on 2008/11/06 11:50:46 UTC

possible score value

Hello,

I have been going through the scoring documentation and code.

I had the expectation that Lucene would enforce a score value between [0,1].
But from what I can grasp from the code and docs, score values can be
greater than one.

Does Lucene considers score values greater than 1 as valid?

Kind regards,
-- 
Francisco

Re: possible score value

Posted by Francisco Borges <fr...@gmail.com>.
Hello Anshum,

No, I hadn't seen that. I had only gone through Similarity, and Weight
classes and worked through their calculations.

Thank you very much for the clarification!

Kind regards,
Francisco

On Thu, Nov 6, 2008 at 11:59 AM, Anshum <an...@gmail.com> wrote:

> Hi Fransisco,
>
> Did you come across :
>      scoreNorm = 1.0f / topDocs.getMaxScore();
> or something of this sort in Hits?
> As per my knowledge, the initial score is more than 1 but finally the
> scores
> get divided by the maxScore of the matched doc set. i.e. Setting an upper
> limit of 1 (for the max scorer).
> Hope this clarifies things! :)
>
> --
> Anshum Gupta
> Naukri Labs!
> http://ai-cafe.blogspot.com
>
> The facts expressed here belong to everybody, the opinions to me. The
> distinction is yours to draw............
>
>
> On Thu, Nov 6, 2008 at 4:20 PM, Francisco Borges <
> francisco.borges@gmail.com
> > wrote:
>
> > Hello,
> >
> > I have been going through the scoring documentation and code.
> >
> > I had the expectation that Lucene would enforce a score value between
> > [0,1].
> > But from what I can grasp from the code and docs, score values can be
> > greater than one.
> >
> > Does Lucene considers score values greater than 1 as valid?
> >
> > Kind regards,
> > --
> > Francisco
> >
>



-- 
Francisco

Re: possible score value

Posted by Chris Hostetter <ho...@fucit.org>.
: Did you come across :
:       scoreNorm = 1.0f / topDocs.getMaxScore();
: or something of this sort in Hits?
: As per my knowledge, the initial score is more than 1 but finally the scores
: get divided by the maxScore of the matched doc set. i.e. Setting an upper
: limit of 1 (for the max scorer).

that code results in a "psuedo-normalization" that generally isn't 
meaningful -- mainly because it's normalized relative the highest scoring 
doc for that query against that index, not any absolute highest possible 
score for that query, or absolute highest possible score for that index.

scores aren't comparable from one query to the next, so normalizing 
between0 and 1 won't tell you anything meaningful -- a "normalized" score 
of "1" from query A isn't neccesarily better then a normalized score of 
0.9 from query B.




-Hoss


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


Re: possible score value

Posted by Anshum <an...@gmail.com>.
Hi Fransisco,

Did you come across :
      scoreNorm = 1.0f / topDocs.getMaxScore();
or something of this sort in Hits?
As per my knowledge, the initial score is more than 1 but finally the scores
get divided by the maxScore of the matched doc set. i.e. Setting an upper
limit of 1 (for the max scorer).
Hope this clarifies things! :)

--
Anshum Gupta
Naukri Labs!
http://ai-cafe.blogspot.com

The facts expressed here belong to everybody, the opinions to me. The
distinction is yours to draw............


On Thu, Nov 6, 2008 at 4:20 PM, Francisco Borges <francisco.borges@gmail.com
> wrote:

> Hello,
>
> I have been going through the scoring documentation and code.
>
> I had the expectation that Lucene would enforce a score value between
> [0,1].
> But from what I can grasp from the code and docs, score values can be
> greater than one.
>
> Does Lucene considers score values greater than 1 as valid?
>
> Kind regards,
> --
> Francisco
>