Package org.elasticsearch.script
Class SimilarityScript
java.lang.Object
org.elasticsearch.script.SimilarityScript
A script that is used to build
ScriptedSimilarity
instances.-
Nested Class Summary
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract double
execute(double weight, ScriptedSimilarity.Query query, ScriptedSimilarity.Field field, ScriptedSimilarity.Term term, ScriptedSimilarity.Doc doc)
Compute the score.
-
Field Details
-
PARAMETERS
-
CONTEXT
-
-
Constructor Details
-
SimilarityScript
public SimilarityScript()
-
-
Method Details
-
execute
public abstract double execute(double weight, ScriptedSimilarity.Query query, ScriptedSimilarity.Field field, ScriptedSimilarity.Term term, ScriptedSimilarity.Doc doc)Compute the score.- Parameters:
weight
- weight computed by theSimilarityWeightScript
if any, or 1.query
- scoring factors that come from the queryfield
- field-level statisticsterm
- term-level statisticsdoc
- per-document statistics
-