Module org.elasticsearch.server
Package org.elasticsearch.ingest
Class ConfigurationUtils.ConstantTemplateScriptFactory
java.lang.Object
org.elasticsearch.ingest.ConfigurationUtils.ConstantTemplateScriptFactory
- All Implemented Interfaces:
TemplateScript.Factory
- Enclosing class:
ConfigurationUtils
public static class ConfigurationUtils.ConstantTemplateScriptFactory
extends Object
implements TemplateScript.Factory
A 'template script' that ignores the model to which it is applied and just always returns a constant String.
Having a separate named class for this allows for some hot code paths to pre-apply the 'template script' statically, rather than bothering to invoke it per-document. Note that this is probably only useful if something expensive is being done with the result of calling the script, and the code can then avoid doing that thing per-document.
-
Method Summary
-
Method Details
-
newInstance
- Specified by:
newInstance
in interfaceTemplateScript.Factory
-