lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrzej Bialecki>
Subject Re: Changing Boosting that was set at indexing time
Date Thu, 16 Jun 2011 10:47:04 GMT
On 6/15/11 7:14 PM, liat oren wrote:
> Ok, thanks a lot
> On 15 June 2011 11:36, Ian Lea<>  wrote:
>> Don't think so.  The boost info is encoded and stored at index time.

Boosts that you set are multiplied by lengthNorm and then stored as a 
coarse-grained float in fieldNorm values. There is a utility class that 
can modify them, in contrib/misc (FieldNormModifier). It sets the boost 
to 1.0 and then applies a Similarity.lengthNorm based on the Similarity 
implementation of your choice. This is a little round-about, but perhaps 
this could work for you?

If not, you can modify norms directly using IndexReader.setNorm(...) but 
you need to remember that this method uses raw byte values, that is the 
result of encoding a floating point value with 

Best regards,
Andrzej Bialecki     <><
  ___. ___ ___ ___ _ _   __________________________________
[__ || __|__/|__||\/|  Information Retrieval, Semantic Web
___|||__||  \|  ||  |  Embedded Unix, System Integration  Contact: info at sigram dot com

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

View raw message