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
Improve request structure for scripts and templates #11091
Comments
Can you deprecate rather than remove the Or maybe offer the new style in 1.6 if you are dropping the old in 2.0? Created from the discussion at #8393 (comment) The ScriptParameterParser added in 1.5 was an effort to make the parsing of Inline Scripts: ..."script": { File Scripts: ..."script": { Index Scripts: ..."script": { Inline scripts can also be specified using the following short form, but ..."script": "doc[foo] + 1" We should have similar constructs for templates. Also, the script and — |
@nik9000 yes, it is the intention to support both the current format and the new format in 1.6. Sorry, I should have mentioned that in the issue. |
Thanks! On Mon, May 11, 2015 at 10:29 AM, Colin Goodheart-Smithe <
|
Backporting the changes to 1.6 proved far too complex to have the confidence in the change, so the plan is now to merge this to 2.0 only and support the old API in the REST layer so that stuff thats stored like transforms and templates continue to work, but to remove support for the old script API in the Java API and the wire format. When the old script API is used through the REST layer it will log a deprecation warning to the new deprecation logger |
Created from the discussion at #8393 (comment)
The ScriptParameterParser added in 1.5 was an effort to make the parsing of scripts in Elasticsearch consistent but did not go far enough. The way scripts are defined in requests is still not one consistent method across the codebase. We want scripts to be defined in an object containing the script, params, lang, and type. This will be defined in the request in the following way:
Inline Scripts:
File Scripts:
Index Scripts:
Inline scripts can also be specified using the following short form, but the language will be the default language and the params will be empty:
We should have similar constructs for templates. Also, the script and template classes should be available in the Java API and should be able to parse and render (build) themselves in XContent as well as being able to be serialized between nodes.
The text was updated successfully, but these errors were encountered: