Skip to content

Allow users to use file based scripts during updates #918

Closed
@jbaiera

Description

@jbaiera

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions