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 java.lang.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(java.lang.Object obj)CombineFunctiongetDefaultScoreCombiner()abstract LeafScoreFunctiongetLeafScoreFunction(org.apache.lucene.index.LeafReaderContext ctx)floatgetWeight()inthashCode()abstract booleanneedsScores()Indicates if document scores are needed by this function.protected ScoreFunctionrewrite(org.apache.lucene.index.IndexReader reader)
-
-
-
Constructor Detail
-
ScoreFunction
protected ScoreFunction(CombineFunction scoreCombiner)
-
-
Method Detail
-
getDefaultScoreCombiner
public CombineFunction getDefaultScoreCombiner()
-
getLeafScoreFunction
public abstract LeafScoreFunction getLeafScoreFunction(org.apache.lucene.index.LeafReaderContext ctx) throws java.io.IOException
- Throws:
java.io.IOException
-
needsScores
public abstract boolean needsScores()
Indicates if document scores are needed by this function.- Returns:
trueif scores are needed.
-
equals
public final boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
getWeight
public float getWeight()
-
doEquals
protected abstract boolean doEquals(ScoreFunction other)
Indicates whether some otherScoreFunctionobject of the same type is "equal to" this one.
-
hashCode
public final int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
doHashCode
protected abstract int doHashCode()
-
rewrite
protected ScoreFunction rewrite(org.apache.lucene.index.IndexReader reader) throws java.io.IOException
- Throws:
java.io.IOException
-
-