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
Nested ClassesModifier and TypeClassDescriptionstatic interfacestatic interfaceA factory to constructFieldScriptinstances. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic ScriptContext<FieldScript.Factory>The context used to compileFieldScriptfactories.static String[] -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedFieldScript(Map<String,Object> params, SearchLookup lookup, org.apache.lucene.index.LeafReaderContext leafContext) -
Method Summary
Modifier and TypeMethodDescriptionabstract Objectexecute()Map<String,ScriptDocValues<?>>getDoc()The doc lookup for the Lucene segment this script was created for.protected LeafSearchLookupThe leaf 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.
-
Field Details
-
PARAMETERS
-
CONTEXT
The context used to compileFieldScriptfactories.
-
-
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.
-