diff options
author | Ryan Ernst <ryan@iernst.net> | 2017-05-24 14:29:02 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-24 14:29:02 -0700 |
commit | 1daacd97b07b601a8a27a8bf64aaf132d2a1931d (patch) | |
tree | 5321e4d094f9c435f23947134fa71a523e5c65ea /core/src/main/java/org/elasticsearch/template/CompiledTemplate.java | |
parent | 0ddd21942315092d76b43786b45c5ebb015849a5 (diff) |
Scripting: Add instance and compiled classes to script contexts (#24868)
This commit modifies the compile method of ScriptService to be context
aware. The ScriptContext is now a generic class which contains both the
instance type and compiled type for a script. Instance type may be
stateful (for example, pre loading field information for the index a
script will execute on, like in expressions), while the compiled type is
stateless and used to construct instance type instances. This change is
only a first step to cutover ScriptService to the new paradigm. It only
converts callers to the script service, and has a small shim to wrap
compilation from the script engines to support the current two fixed
instance types, SearchScript and ExecutableScript.
Diffstat (limited to 'core/src/main/java/org/elasticsearch/template/CompiledTemplate.java')
-rw-r--r-- | core/src/main/java/org/elasticsearch/template/CompiledTemplate.java | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/core/src/main/java/org/elasticsearch/template/CompiledTemplate.java b/core/src/main/java/org/elasticsearch/template/CompiledTemplate.java index 380c36a590..d03993583c 100644 --- a/core/src/main/java/org/elasticsearch/template/CompiledTemplate.java +++ b/core/src/main/java/org/elasticsearch/template/CompiledTemplate.java @@ -21,10 +21,6 @@ package org.elasticsearch.template; import java.util.Map; -import org.elasticsearch.common.bytes.BytesReference; -import org.elasticsearch.script.CompiledScript; -import org.elasticsearch.script.ScriptType; - /** * A template that may be executed. */ |