public abstract static class Similarity.SimWeight extends Object
SimWeightand define the statistics they require in the subclass. Examples include idf, average field length, etc.
|Constructor and Description|
|Modifier and Type||Method and Description|
The value for normalization of contained query clauses (e.g.
Assigns the query normalization factor and boost from parent queries to this.
public abstract float getValueForNormalization()
NOTE: a Similarity implementation might not use any query normalization at all, it's not required. However, if it wants to participate in query normalization, it can return a value here.
public abstract void normalize(float queryNorm, float boost)
NOTE: a Similarity implementation might not use this normalized value at all, it's not required. However, it's usually a good idea to at least incorporate the boost into its score.
NOTE: If this method is called several times, it behaves as if only the last call was performed.
Copyright © 2000-2017 Apache Software Foundation. All Rights Reserved.