lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nick Smith <>
Subject Re: Issue with Similarity and negative numbers
Date Mon, 15 Sep 2003 09:27:44 GMT
>From: Doug Cutting <>
>Subject: Re: Issue with Similarity and negative numbers
>To: Lucene Developers List <>

>Nick Smith wrote:
>> I had taken care to make sure that the change was *compatible*.  :-(
>You've radically changed the range of values that can be represented. 
>Instead of representing numbers from 0 to 7 billion, you represent 
>numbers between -1.75 and 1.5 (at least according to the listings you 
>sent).  That's a big change.
Duhh. What one can miss seeing! So scrap that idea...

[snip Dougs explanations of why I'm stupid]

>How about this: when indexing, set the boost to 
>Similarity.decodeNorm(byte).  Then, in your HitCollector implementation, 
>use IndexReader.norms() to directly access the byte stored.  The divide 
>the score by Similarity.encodeNorm(byte) to remove this factor from the 
>score.  Would that do the trick?

Something similiar - I think I have a solution now to bypass the
scoring issues that I was having *without* changing the Similarity
base class.


Thanks for the tip,


View raw message