You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by Paul Elschot <pa...@xs4all.nl> on 2004/10/20 19:40:28 UTC

Re: Normalized Scoring

Chuck,

Hits normalizes the final highest score to 1.0, and you
can mplement your own HitCollector to suppress
that normalisation. 

For the rest have a look at Weight, it can easily be used
for your example by having sumOfSquaredWeights()
return some sum of the weights, and letting normalize()
do the divisions into the weights of the individual TermQuery's.

Many Lucene queries implement their Weight in an inner class.
It is used as an interim step to get from a Query to a Scorer.

Kind regards,
Paul Elschot

On Wednesday 20 October 2004 07:56, Chuck Williams wrote:
...
> 
> As an example of the simple boost-based normalization, for the query
>   ((a^2 b)^3 (c d^2))
> the net boosts are:
>   a --> 6
>   b --> 3
>   c --> 1
>   d --> 2
> 
> So if a and b matched, but not c and d, in the top scoring result, its
> score would be 0.75.  The normalizer would be 0.75/(current score except
> for the current normalization).  This normalizer would be applied to all
> current scores (minus normalization) to create the normalized scores.
> 
> For simple query (a b), if only one of the terms matched in the top
> result, then its score would be 0.5, vs. 1.0 or many other possible
> scores today.
> 


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