Skip to content

Remove native scripts and replace with script engine example #19966

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
rjernst opened this issue Aug 11, 2016 · 0 comments · Fixed by #24726
Closed

Remove native scripts and replace with script engine example #19966

rjernst opened this issue Aug 11, 2016 · 0 comments · Fixed by #24726
Labels
>breaking-java :Core/Infra/Scripting Scripting abstractions, Painless, and Mustache help wanted adoptme

Comments

@rjernst
Copy link
Member

rjernst commented Aug 11, 2016

Native scripts are heavyweight things that require creating a plugin. They are used by advanced users who need access to special code (eg a custom library to do something not available in the exposed methods/classes in painless or groovy). Internally, we have a single NativeScriptEngine which handles taking the registered native scripts, and making them accessible. But writing a NativeScriptFactory isn't much different than writing a ScriptEngine.

I think we should simplify scripting internals by removing NativeScriptEngine, and documenting instead how to create a ScriptEngine for this advanced case.

@rjernst rjernst added discuss :Core/Infra/Scripting Scripting abstractions, Painless, and Mustache labels Aug 11, 2016
rjernst added a commit to rjernst/elasticsearch that referenced this issue May 10, 2017
This commit documents how to write a `ScriptEngine` in order to use
expert internal apis, such as using Lucene directly to find index term
statistics. These documents prepare the way to remove both native
scripts and IndexLookup.

The example java code is actually compiled and tested under a new gradle
subproject for example plugins. This change does not yet breakup
jvm-example into the new examples dir, which should be done separately.

relates elastic#19359
relates elastic#19966
rjernst added a commit that referenced this issue May 11, 2017
…#24603)

This commit documents how to write a `ScriptEngine` in order to use
expert internal apis, such as using Lucene directly to find index term
statistics. These documents prepare the way to remove both native
scripts and IndexLookup.

The example java code is actually compiled and tested under a new gradle
subproject for example plugins. This change does not yet breakup
jvm-example into the new examples dir, which should be done separately.

relates #19359
relates #19966
rjernst added a commit that referenced this issue May 11, 2017
…#24603)

This commit documents how to write a `ScriptEngine` in order to use
expert internal apis, such as using Lucene directly to find index term
statistics. These documents prepare the way to remove both native
scripts and IndexLookup.

The example java code is actually compiled and tested under a new gradle
subproject for example plugins. This change does not yet breakup
jvm-example into the new examples dir, which should be done separately.

relates #19359
relates #19966
rjernst added a commit to rjernst/elasticsearch that referenced this issue May 15, 2017
Native scripts are no longer documented and instead using a ScriptEngine
is recommended. This change adds a deprecation warning for removal in
6.0.

relates elastic#19966
rjernst added a commit that referenced this issue May 16, 2017
Native scripts are no longer documented and instead using a ScriptEngine
is recommended. This change adds a deprecation warning for removal in
6.0.

relates #19966
rjernst added a commit that referenced this issue May 16, 2017
Native scripts are no longer documented and instead using a ScriptEngine
is recommended. This change adds a deprecation warning for removal in
6.0.

relates #19966
rjernst added a commit to rjernst/elasticsearch that referenced this issue May 17, 2017
Native scripts have been replaced in documentation by implementing
a ScriptEngine and they were deprecated in 5.5.0. This commit
removes the native script infrastructure for 6.0.

closes elastic#19966
rjernst added a commit that referenced this issue May 17, 2017
Native scripts have been replaced in documentation by implementing
a ScriptEngine and they were deprecated in 5.5.0. This commit
removes the native script infrastructure for 6.0.

closes #19966
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>breaking-java :Core/Infra/Scripting Scripting abstractions, Painless, and Mustache help wanted adoptme
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants