lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antony Bowesman <>
Subject Re: Scores from HitCollector
Date Thu, 29 Mar 2007 21:17:13 GMT
Erick Erickson wrote:
> I wound up using a TopDocs instead, which has a getMaxScore that
> I was able to use to normalize scores to between 0 and 1. In my case
> I was collapsing the results into quintiles, so I threw them all
> back into a FieldSortedHitQueue to get them sorted by secondary
> criteria once the scores were all one of 5 discrete values....

My HitCollector is a variant of TopDocCollector and I have max score.  I found 
where Hits does the normalisation in Hits.getMoreDocs().  It simply multiplies 
all scores by (1/maxScore).

I was looking too deep down around the Scorer...

Can anyone say why this is useful and what's wrong about raw scores?


> On 3/29/07, Antony Bowesman <> wrote:
>> Hits will normalise scores >0<=1, but I'm using HitCollector and haven't
>> worked
>> out how to normalise those scores.
>> From what I can see, the scores are just multiplied by a factor to bring
>> the
>> top score down to 1.  Is this right or is there something more to it.
>> Do I need to normalise scores anyway - what's the reason it's done?
>> Antony

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

View raw message