lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Muir (Commented) (JIRA)" <>
Subject [jira] [Commented] (LUCENE-3957) Document precision requirements of setBoost calls
Date Thu, 05 Apr 2012 12:25:25 GMT


Robert Muir commented on LUCENE-3957:

I don't think we should put docs there in those classes:

in trunk you can use however many bytes you want for this,
so the text would be wrong anyway. 

its an implementation detail of the default similarity that 
it uses a single byte, and it documents it does this already.

> Document precision requirements of setBoost calls
> -------------------------------------------------
>                 Key: LUCENE-3957
>                 URL:
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: general/javadocs
>    Affects Versions: 3.5
>            Reporter: Jordi Salvat i Alabart
> The behaviour of index-time boosts seems pretty erratic (e.g. a boost of 8.0 produces
the exact same score as a boost of 9.0) until you become aware that these factors end up encoded
in a single byte, with a three-bit mantissa. This consumed a whole day of research for us,
and I still believe we were lucky to spot it, given how deeply dug into the code & documentation
this information is.
> I suggest adding a small note to the JavaDoc of setBoost methods in Document, Fieldable,
FieldInvertState, and possibly AbstractField, Field, and NumericField.
> Suggested text:
> "Note that all index-time boost values end up encoded using Similarity.encodeNormValue,
with a 3-bit mantissa -- so differences in the boost value of less than 25% may easily be
rounded away."

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


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

View raw message