Module org.elasticsearch.server
Class ScriptScoreFunction
java.lang.Object
org.elasticsearch.common.lucene.search.function.ScoreFunction
org.elasticsearch.common.lucene.search.function.ScriptScoreFunction
-
Constructor Summary
ConstructorsConstructorDescriptionScriptScoreFunction(Script sScript, ScoreScript.LeafFactory script, SearchLookup lookup, String indexName, int shardId) -
Method Summary
Modifier and TypeMethodDescriptionprotected booleandoEquals(ScoreFunction other) Indicates whether some otherScoreFunctionobject of the same type is "equal to" this one.protected intgetLeafScoreFunction(org.apache.lucene.index.LeafReaderContext ctx) booleanIndicates if document scores are needed by this function.booleanvoidsetTermStatsFactory(BiFunction<org.apache.lucene.index.LeafReaderContext, IntSupplier, ScriptTermStats> termStatsFactory) 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, SearchLookup lookup, String indexName, int shardId)
-
-
Method Details
-
getLeafScoreFunction
public LeafScoreFunction getLeafScoreFunction(org.apache.lucene.index.LeafReaderContext ctx) throws IOException - Specified by:
getLeafScoreFunctionin classScoreFunction- Throws:
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.
-
needsTermStats
public boolean needsTermStats() -
setTermStatsFactory
public void setTermStatsFactory(BiFunction<org.apache.lucene.index.LeafReaderContext, IntSupplier, ScriptTermStats> termStatsFactory) -
toString
-
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
-