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 protected
ScoreFunction(CombineFunction scoreCombiner)
-
Method Summary
Modifier and Type Method Description protected abstract boolean
doEquals(ScoreFunction other)
Indicates whether some otherScoreFunction
object of the same type is "equal to" this one.protected abstract int
doHashCode()
boolean
equals(java.lang.Object obj)
CombineFunction
getDefaultScoreCombiner()
abstract LeafScoreFunction
getLeafScoreFunction(org.apache.lucene.index.LeafReaderContext ctx)
float
getWeight()
int
hashCode()
abstract boolean
needsScores()
Indicates if document scores are needed by this function.protected ScoreFunction
rewrite(org.apache.lucene.index.IndexReader reader)
-
Constructor Details
-
Method Details
-
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:
true
if scores are needed.
-
equals
public final boolean equals(java.lang.Object obj)- Overrides:
equals
in classjava.lang.Object
-
getWeight
public float getWeight() -
doEquals
Indicates whether some otherScoreFunction
object of the same type is "equal to" this one. -
hashCode
public final int hashCode()- Overrides:
hashCode
in 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
-