lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrzej Bialecki ...@getopt.org>
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<ian.lea@gmail.com>  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 
Similarity.encodeNormValue(..).

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


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


Mime
View raw message