Package org.elasticsearch.script
Class StringSortScript
java.lang.Object
org.elasticsearch.script.StringSortScript
- All Implemented Interfaces:
ScorerAware
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceA factory to construct statefulStringSortScriptfactories for a specific index.static interfaceA factory to constructStringSortScriptinstances. -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionStringSortScript(Map<String,Object> params, SearchLookup lookup, org.apache.lucene.index.LeafReaderContext leafContext) -
Method Summary
Modifier and TypeMethodDescriptionabstract Stringexecute()doubleReturn 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.voidsetDocument(int docid)Set the current document to run the script on next.voidsetScorer(org.apache.lucene.search.Scorable scorer)
-
Field Details
-
PARAMETERS
-
CONTEXT
-
-
Constructor Details
-
StringSortScript
public StringSortScript(Map<String,Object> params, SearchLookup lookup, org.apache.lucene.index.LeafReaderContext leafContext)
-
-
Method Details
-
execute
-
getParams
Return the parameters for this script. -
setScorer
public void setScorer(org.apache.lucene.search.Scorable scorer)- Specified by:
setScorerin 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.
-