Class WeightFactorFunction
- java.lang.Object
-
- org.elasticsearch.common.lucene.search.function.ScoreFunction
-
- org.elasticsearch.common.lucene.search.function.WeightFactorFunction
-
public class WeightFactorFunction extends ScoreFunction
-
-
Constructor Summary
Constructors Constructor Description WeightFactorFunction(float weight)WeightFactorFunction(float weight, ScoreFunction scoreFunction)
-
Method Summary
Modifier and Type Method Description protected booleandoEquals(ScoreFunction other)Indicates whether some otherScoreFunctionobject of the same type is "equal to" this one.protected intdoHashCode()org.apache.lucene.search.ExplanationexplainWeight()LeafScoreFunctiongetLeafScoreFunction(org.apache.lucene.index.LeafReaderContext ctx)ScoreFunctiongetScoreFunction()floatgetWeight()booleanneedsScores()Indicates if document scores are needed by this function.-
Methods inherited from class org.elasticsearch.common.lucene.search.function.ScoreFunction
equals, getDefaultScoreCombiner, hashCode, rewrite
-
-
-
-
Constructor Detail
-
WeightFactorFunction
public WeightFactorFunction(float weight, ScoreFunction scoreFunction)
-
WeightFactorFunction
public WeightFactorFunction(float weight)
-
-
Method Detail
-
getLeafScoreFunction
public LeafScoreFunction getLeafScoreFunction(org.apache.lucene.index.LeafReaderContext ctx) throws java.io.IOException
- Specified by:
getLeafScoreFunctionin classScoreFunction- Throws:
java.io.IOException
-
needsScores
public boolean needsScores()
Description copied from class:ScoreFunctionIndicates if document scores are needed by this function.- Specified by:
needsScoresin classScoreFunction- Returns:
trueif scores are needed.
-
explainWeight
public org.apache.lucene.search.Explanation explainWeight()
-
getWeight
public float getWeight()
- Overrides:
getWeightin classScoreFunction
-
getScoreFunction
public ScoreFunction getScoreFunction()
-
doEquals
protected boolean doEquals(ScoreFunction other)
Description copied from class:ScoreFunctionIndicates whether some otherScoreFunctionobject of the same type is "equal to" this one.- Specified by:
doEqualsin classScoreFunction
-
doHashCode
protected int doHashCode()
- Specified by:
doHashCodein classScoreFunction
-
-