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)
-
Method Summary
Modifier and Type Method Description protected boolean
doEquals(ScoreFunction other)
Indicates whether some otherScoreFunction
object of the same type is "equal to" this one.protected int
doHashCode()
LeafScoreFunction
getLeafScoreFunction(org.apache.lucene.index.LeafReaderContext ctx)
boolean
needsScores()
Indicates if document scores are needed by this function.java.lang.String
toString()
Methods inherited from class org.elasticsearch.common.lucene.search.function.ScoreFunction
equals, getDefaultScoreCombiner, getWeight, hashCode, rewrite
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Constructor Details
-
ScriptScoreFunction
public ScriptScoreFunction(Script sScript, ScoreScript.LeafFactory script, java.lang.String indexName, int shardId)
-
-
Method Details
-
getLeafScoreFunction
public LeafScoreFunction getLeafScoreFunction(org.apache.lucene.index.LeafReaderContext ctx) throws java.io.IOException- Specified by:
getLeafScoreFunction
in classScoreFunction
- Throws:
java.io.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
public java.lang.String toString()- Overrides:
toString
in classjava.lang.Object
-
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
-