Package org.elasticsearch.script
Class FieldScript
- java.lang.Object
-
- org.elasticsearch.script.FieldScript
-
public abstract class FieldScript extends Object
A script to produce dynamic values for return fields.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceFieldScript.Factorystatic interfaceFieldScript.LeafFactoryA factory to constructFieldScriptinstances.
-
Field Summary
Fields Modifier and Type Field Description static ScriptContext<FieldScript.Factory>CONTEXTThe context used to compileFieldScriptfactories.static String[]PARAMETERS
-
Constructor Summary
Constructors Modifier Constructor Description protectedFieldScript()FieldScript(Map<String,Object> params, SearchLookup lookup, LeafReaderContext leafContext)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract Objectexecute()Map<String,ScriptDocValues<?>>getDoc()The doc lookup for the Lucene segment this script was created for.protected LeafSearchLookupgetLeafLookup()The leaf lookup for the Lucene segment this script was created for.Map<String,Object>getParams()Return the parameters for this script.voidsetDocument(int docid)Set the current document to run the script on next.
-
-
-
Field Detail
-
PARAMETERS
public static final String[] PARAMETERS
-
CONTEXT
public static final ScriptContext<FieldScript.Factory> CONTEXT
The context used to compileFieldScriptfactories.
-
-
Constructor Detail
-
FieldScript
public FieldScript(Map<String,Object> params, SearchLookup lookup, LeafReaderContext leafContext)
-
FieldScript
protected FieldScript()
-
-
Method Detail
-
execute
public abstract Object execute()
-
getLeafLookup
protected final LeafSearchLookup getLeafLookup()
The leaf lookup for the Lucene segment this script was created for.
-
getDoc
public final Map<String,ScriptDocValues<?>> 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.
-
-