Package org.elasticsearch.script
Class FieldScript
- java.lang.Object
-
- org.elasticsearch.script.FieldScript
-
public abstract class FieldScript extends java.lang.Object
A script to produce dynamic values for return fields.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
FieldScript.Factory
static interface
FieldScript.LeafFactory
A factory to constructFieldScript
instances.
-
Field Summary
Fields Modifier and Type Field Description static ScriptContext<FieldScript.Factory>
CONTEXT
The context used to compileFieldScript
factories.static java.lang.String[]
PARAMETERS
-
Constructor Summary
Constructors Modifier Constructor Description protected
FieldScript()
FieldScript(java.util.Map<java.lang.String,java.lang.Object> params, SearchLookup lookup, org.apache.lucene.index.LeafReaderContext leafContext)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract java.lang.Object
execute()
java.util.Map<java.lang.String,ScriptDocValues<?>>
getDoc()
The doc lookup for the Lucene segment this script was created for.protected LeafSearchLookup
getLeafLookup()
The leaf 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.
-
-
-
Field Detail
-
PARAMETERS
public static final java.lang.String[] PARAMETERS
-
CONTEXT
public static final ScriptContext<FieldScript.Factory> CONTEXT
The context used to compileFieldScript
factories.
-
-
Constructor Detail
-
FieldScript
public FieldScript(java.util.Map<java.lang.String,java.lang.Object> params, SearchLookup lookup, org.apache.lucene.index.LeafReaderContext leafContext)
-
FieldScript
protected FieldScript()
-
-
Method Detail
-
execute
public abstract java.lang.Object execute()
-
getLeafLookup
protected final LeafSearchLookup getLeafLookup()
The leaf lookup for the Lucene segment this script was created for.
-
getParams
public java.util.Map<java.lang.String,java.lang.Object> getParams()
Return the parameters for this script.
-
getDoc
public final java.util.Map<java.lang.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.
-
-