Package org.elasticsearch.script
Class NumberSortScript
java.lang.Object
org.elasticsearch.script.NumberSortScript
- All Implemented Interfaces:
ScorerAware
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
A factory to construct statefulNumberSortScript
factories for a specific index.static interface
A factory to constructNumberSortScript
instances. -
Field Summary
-
Constructor Summary
ModifierConstructorDescriptionprotected
NumberSortScript(Map<String,Object> params, SearchLookup lookup, org.apache.lucene.index.LeafReaderContext leafContext)
-
Method Summary
Modifier and TypeMethodDescriptionabstract double
execute()
double
Return the score of the current document.Map<String,ScriptDocValues<?>>
getDoc()
The doc lookup for the Lucene segment this script was created for.Return the parameters for this script.void
setDocument(int docid)
Set the current document to run the script on next.void
setScorer(org.apache.lucene.search.Scorable scorer)
-
Field Details
-
PARAMETERS
-
CONTEXT
-
-
Constructor Details
-
NumberSortScript
public NumberSortScript(Map<String,Object> params, SearchLookup lookup, org.apache.lucene.index.LeafReaderContext leafContext) -
NumberSortScript
protected NumberSortScript()
-
-
Method Details
-
execute
public abstract double execute() -
getParams
Return the parameters for this script. -
setScorer
public void setScorer(org.apache.lucene.search.Scorable scorer)- Specified by:
setScorer
in interfaceScorerAware
-
get_score
public double get_score()Return the score of the current document. -
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.
-