Package org.elasticsearch.script
Class FieldScript
java.lang.Object
org.elasticsearch.script.FieldScript
A script to produce dynamic values for return fields.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
static interface
A factory to constructFieldScript
instances. -
Field Summary
Modifier and TypeFieldDescriptionstatic ScriptContext<FieldScript.Factory>
The context used to compileFieldScript
factories.static String[]
-
Constructor Summary
ModifierConstructorDescriptionprotected
FieldScript(Map<String,Object> params, SearchLookup lookup, org.apache.lucene.index.LeafReaderContext leafContext)
-
Method Summary
Modifier and TypeMethodDescriptionabstract Object
execute()
Map<String,ScriptDocValues<?>>
getDoc()
The doc lookup for the Lucene segment this script was created for.protected LeafSearchLookup
The leaf 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.
-
Field Details
-
PARAMETERS
-
CONTEXT
The context used to compileFieldScript
factories.
-
-
Constructor Details
-
FieldScript
public FieldScript(Map<String,Object> params, SearchLookup lookup, org.apache.lucene.index.LeafReaderContext leafContext) -
FieldScript
protected FieldScript()
-
-
Method Details
-
execute
-
getLeafLookup
The leaf lookup for the Lucene segment this script was created for. -
getParams
Return the parameters for this script. -
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.
-