Skip to content
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

Allow users to use file based scripts during updates #918

Closed
jbaiera opened this issue Jan 16, 2017 · 0 comments
Closed

Allow users to use file based scripts during updates #918

jbaiera opened this issue Jan 16, 2017 · 0 comments

Comments

@jbaiera
Copy link
Member

jbaiera commented Jan 16, 2017

The connector does not support usage of file based scripts on Elasticsearch when submitting updates or upserts.

Consider the files a.painless and b.groovy already installed on Elasticsearch nodes:


In 5.x and above the connector always automatically formats scripts in the form of inline scripts as follows:

{"script":{"inline":"a","lang":"painless","params":{"count":1}}}

...but for file based scripts the following format should be used:

{"script":{"file":"a","lang":"painless","params":{"count":1}}}

In 2.x and below, the connector automatically formats the scripts in the form of regular script fields:

{"script":"b","language":"groovy","params":{"count":1}}}

...but in the case of using a file based script, the following format should be used:

{"script_file":"b","language":"groovy","params":{"count":1}}}

New properties should be added to encapsulate the type of script being executed, either file or inline, and the old script property should be deprecated, defaulting to being treated as inline.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant