Class FieldValueFactorFunction
- java.lang.Object
-
- org.elasticsearch.common.lucene.search.function.ScoreFunction
-
- org.elasticsearch.common.lucene.search.function.FieldValueFactorFunction
-
public class FieldValueFactorFunction extends ScoreFunction
A function_score function that multiplies the score with the value of a field from the document, optionally multiplying the field by a factor first, and applying a modification (log, ln, sqrt, square, etc) afterwards.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
FieldValueFactorFunction.Modifier
The Type class encapsulates the modification types that can be applied to the score/value product.
-
Constructor Summary
Constructors Constructor Description FieldValueFactorFunction(java.lang.String field, float boostFactor, FieldValueFactorFunction.Modifier modifierType, java.lang.Double missing, IndexNumericFieldData indexFieldData)
-
Method Summary
Modifier and Type Method Description protected boolean
doEquals(ScoreFunction other)
Indicates whether some otherScoreFunction
object of the same type is "equal to" this one.protected int
doHashCode()
LeafScoreFunction
getLeafScoreFunction(org.apache.lucene.index.LeafReaderContext ctx)
boolean
needsScores()
Indicates if document scores are needed by this function.-
Methods inherited from class org.elasticsearch.common.lucene.search.function.ScoreFunction
equals, getDefaultScoreCombiner, getWeight, hashCode, rewrite
-
-
-
-
Constructor Detail
-
FieldValueFactorFunction
public FieldValueFactorFunction(java.lang.String field, float boostFactor, FieldValueFactorFunction.Modifier modifierType, java.lang.Double missing, IndexNumericFieldData indexFieldData)
-
-
Method Detail
-
getLeafScoreFunction
public LeafScoreFunction getLeafScoreFunction(org.apache.lucene.index.LeafReaderContext ctx)
- Specified by:
getLeafScoreFunction
in classScoreFunction
-
needsScores
public boolean needsScores()
Description copied from class:ScoreFunction
Indicates if document scores are needed by this function.- Specified by:
needsScores
in classScoreFunction
- Returns:
true
if scores are needed.
-
doEquals
protected boolean doEquals(ScoreFunction other)
Description copied from class:ScoreFunction
Indicates whether some otherScoreFunction
object of the same type is "equal to" this one.- Specified by:
doEquals
in classScoreFunction
-
doHashCode
protected int doHashCode()
- Specified by:
doHashCode
in classScoreFunction
-
-