Package org.opensearch.script
Class StringSortScript
java.lang.Object
org.opensearch.script.StringSortScript
- All Implemented Interfaces:
ScorerAware
public abstract class StringSortScript
extends java.lang.Object
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
StringSortScript.Factory
A factory to construct statefulStringSortScript
factories for a specific index.static interface
StringSortScript.LeafFactory
A factory to constructStringSortScript
instances. -
Field Summary
Fields Modifier and Type Field Description static ScriptContext<StringSortScript.Factory>
CONTEXT
static java.lang.String[]
PARAMETERS
-
Constructor Summary
Constructors Constructor Description StringSortScript(java.util.Map<java.lang.String,java.lang.Object> params, SearchLookup lookup, org.apache.lucene.index.LeafReaderContext leafContext)
-
Method Summary
Modifier and Type Method Description abstract java.lang.String
execute()
double
get_score()
Return the score of the current document.java.util.Map<java.lang.String,ScriptDocValues<?>>
getDoc()
The doc lookup for the Lucene segment this script was created for.java.util.Map<java.lang.String,java.lang.Object>
getParams()
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
public static final java.lang.String[] PARAMETERS -
CONTEXT
-
-
Constructor Details
-
StringSortScript
public StringSortScript(java.util.Map<java.lang.String,java.lang.Object> params, SearchLookup lookup, org.apache.lucene.index.LeafReaderContext leafContext)
-
-
Method Details
-
execute
public abstract java.lang.String execute() -
getParams
public java.util.Map<java.lang.String,java.lang.Object> 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.
-