elasticsearch-dsl-py icon indicating copy to clipboard operation
elasticsearch-dsl-py copied to clipboard

No way to specify script language in Document.update

Open haynesgt opened this issue 2 years ago • 3 comments

elasticsearch_dsl==7.4.0

The script param is assumed to be a string here:

https://github.com/elastic/elasticsearch-dsl-py/blob/c089a40ce6566de8a1fb5943501d2e6bfc4c06c7/elasticsearch_dsl/document.py#L391

but there is no way to set the language of the script.

It would be more intuitive if it set body["script"] = script if the script param were a dict.

haynesgt avatar Jan 17 '22 19:01 haynesgt

That'd be a nice addition, would you be able to open a PR with the feature and test(s)?

sethmlarson avatar Jan 18 '22 23:01 sethmlarson

ok

haynesgt avatar Jan 19 '22 00:01 haynesgt

@sethmlarson could you review the pr?

haynesgt avatar May 04 '22 18:05 haynesgt