Class ScoreFunction
- java.lang.Object
-
- org.elasticsearch.common.lucene.search.function.ScoreFunction
-
- Direct Known Subclasses:
DecayFunctionBuilder.AbstractDistanceScoreFunction,FieldValueFactorFunction,FunctionScoreQuery.FilterScoreFunction,RandomScoreFunction,ScriptScoreFunction,WeightFactorFunction
public abstract class ScoreFunction extends Object
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedScoreFunction(CombineFunction scoreCombiner)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract booleandoEquals(ScoreFunction other)Indicates whether some otherScoreFunctionobject of the same type is "equal to" this one.protected abstract intdoHashCode()booleanequals(Object obj)CombineFunctiongetDefaultScoreCombiner()abstract LeafScoreFunctiongetLeafScoreFunction(LeafReaderContext ctx)floatgetWeight()inthashCode()abstract booleanneedsScores()Indicates if document scores are needed by this function.protected ScoreFunctionrewrite(IndexReader reader)
-
-
-
Constructor Detail
-
ScoreFunction
protected ScoreFunction(CombineFunction scoreCombiner)
-
-
Method Detail
-
getDefaultScoreCombiner
public CombineFunction getDefaultScoreCombiner()
-
getLeafScoreFunction
public abstract LeafScoreFunction getLeafScoreFunction(LeafReaderContext ctx) throws IOException
- Throws:
IOException
-
needsScores
public abstract boolean needsScores()
Indicates if document scores are needed by this function.- Returns:
trueif scores are needed.
-
getWeight
public float getWeight()
-
doEquals
protected abstract boolean doEquals(ScoreFunction other)
Indicates whether some otherScoreFunctionobject of the same type is "equal to" this one.
-
doHashCode
protected abstract int doHashCode()
-
rewrite
protected ScoreFunction rewrite(IndexReader reader) throws IOException
- Throws:
IOException
-
-