The default value is 1.0f
(no boost).
@see #setBoost(float)
Only fields can have an index-time boost, if you want to simulate a "document boost", then you must pre-multiply it across all the relevant fields yourself.
The boost is used to compute the norm factor for the field. By default, in the {@link Similarity#computeNorm(FieldInvertState)} method, the boost value is multiplied by the length normalization factor and then rounded by {@link DefaultSimilarity#encodeNormValue(float)} before it is stored in theindex. One should attempt to ensure that this product does not overflow the range of that encoding.
It is illegal to return a boost other than 1.0f for a field that is not indexed ( {@link IndexableFieldType#indexed()} is false) or omits normalization values( {@link IndexableFieldType#omitNorms()} returns true). @see Similarity#computeNorm(FieldInvertState) @see DefaultSimilarity#encodeNormValue(float)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|