Class ScriptScoreFunction
java.lang.Object
org.elasticsearch.common.lucene.search.function.ScoreFunction
org.elasticsearch.common.lucene.search.function.ScriptScoreFunction
public class ScriptScoreFunction extends ScoreFunction
-
Constructor Summary
Constructors Constructor Description ScriptScoreFunction(Script sScript, ScoreScript.LeafFactory script, java.lang.String indexName, int shardId, Version indexVersion) -
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()LeafScoreFunctiongetLeafScoreFunction(org.apache.lucene.index.LeafReaderContext ctx)booleanneedsScores()Indicates if document scores are needed by this function.java.lang.StringtoString()Methods inherited from class org.elasticsearch.common.lucene.search.function.ScoreFunction
equals, getDefaultScoreCombiner, getWeight, hashCode, rewrite
-
Constructor Details
-
ScriptScoreFunction
public ScriptScoreFunction(Script sScript, ScoreScript.LeafFactory script, java.lang.String indexName, int shardId, Version indexVersion)
-
-
Method Details
-
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.
-
toString
public java.lang.String toString()- Overrides:
toStringin classjava.lang.Object
-
doEquals
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
-