Package org.elasticsearch.script
Class NumberSortScript
- java.lang.Object
-
- org.elasticsearch.script.NumberSortScript
-
- All Implemented Interfaces:
ScorerAware
public abstract class NumberSortScript extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceNumberSortScript.FactoryA factory to construct statefulNumberSortScriptfactories for a specific index.static interfaceNumberSortScript.LeafFactoryA factory to constructNumberSortScriptinstances.
-
Field Summary
Fields Modifier and Type Field Description static ScriptContext<NumberSortScript.Factory>CONTEXTstatic String[]PARAMETERS
-
Constructor Summary
Constructors Modifier Constructor Description protectedNumberSortScript()NumberSortScript(Map<String,Object> params, SearchLookup lookup, LeafReaderContext leafContext)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract doubleexecute()doubleget_score()Return the score of the current document.Map<String,ScriptDocValues<?>>getDoc()The doc lookup for the Lucene segment this script was created for.Map<String,Object>getParams()Return the parameters for this script.voidsetDocument(int docid)Set the current document to run the script on next.voidsetScorer(Scorable scorer)
-
-
-
Field Detail
-
PARAMETERS
public static final String[] PARAMETERS
-
CONTEXT
public static final ScriptContext<NumberSortScript.Factory> CONTEXT
-
-
Constructor Detail
-
NumberSortScript
public NumberSortScript(Map<String,Object> params, SearchLookup lookup, LeafReaderContext leafContext)
-
NumberSortScript
protected NumberSortScript()
-
-
Method Detail
-
execute
public abstract double execute()
-
setScorer
public void setScorer(Scorable scorer)
- Specified by:
setScorerin interfaceScorerAware
-
get_score
public double get_score()
Return the score of the current document.
-
getDoc
public Map<String,ScriptDocValues<?>> getDoc()
The doc lookup for the Lucene segment this script was created for.
-
setDocument
public void setDocument(int docid)
Set the current document to run the script on next.
-
-