Package org.elasticsearch.script
Class SimilarityWeightScript
java.lang.Object
org.elasticsearch.script.SimilarityWeightScript
public abstract class SimilarityWeightScript
extends java.lang.Object
A script that is used to compute scoring factors that are the same for all documents.
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
SimilarityWeightScript.Factory
-
Field Summary
Fields Modifier and Type Field Description static ScriptContext<SimilarityWeightScript.Factory>
CONTEXT
static java.lang.String[]
PARAMETERS
-
Constructor Summary
Constructors Constructor Description SimilarityWeightScript()
-
Method Summary
Modifier and Type Method Description abstract double
execute(ScriptedSimilarity.Query query, ScriptedSimilarity.Field field, ScriptedSimilarity.Term term)
Compute the weight.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
PARAMETERS
public static final java.lang.String[] PARAMETERS -
CONTEXT
-
-
Constructor Details
-
SimilarityWeightScript
public SimilarityWeightScript()
-
-
Method Details
-
execute
public abstract double execute(ScriptedSimilarity.Query query, ScriptedSimilarity.Field field, ScriptedSimilarity.Term term)Compute the weight.- Parameters:
query
- scoring factors that come from the queryfield
- field-level statisticsterm
- term-level statistics
-