Class ScriptScoreFunction
java.lang.Object
org.elasticsearch.common.lucene.search.function.ScoreFunction
org.elasticsearch.common.lucene.search.function.ScriptScoreFunction
-
Constructor Summary
ConstructorDescriptionScriptScoreFunction(Script sScript, ScoreScript.LeafFactory script, String indexName, int shardId)
-
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
doEquals(ScoreFunction other)
Indicates whether some otherScoreFunction
object of the same type is "equal to" this one.protected int
getLeafScoreFunction(org.apache.lucene.index.LeafReaderContext ctx)
boolean
Indicates if document scores are needed by this function.toString()
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, String indexName, int shardId)
-
-
Method Details
-
getLeafScoreFunction
public LeafScoreFunction getLeafScoreFunction(org.apache.lucene.index.LeafReaderContext ctx) throws IOException- Specified by:
getLeafScoreFunction
in classScoreFunction
- Throws:
IOException
-
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.
-
toString
-
doEquals
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
-