-
Notifications
You must be signed in to change notification settings - Fork 73
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 script to have string or object value #2960
base: main
Are you sure you want to change the base?
Conversation
Following you can find the validation results for the APIs you have changed.
You can validate these APIs yourself by using the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this does not affect elasticsearch-py, I'm approving.
However since it could affect elasticsearch-dsl-py, I added @miguelgrinberg to the list of reviewers.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. And the Python DSL client is not affected by this change.
thank you both! I'll remember the python dsl for future issues |
Shouldn't cause any issues for the JS generator either. 👍 |
Originally reported as a Java Client issue.
PutScript API support either the
source
of the script as a string, or as a Search Template object, which is equivalent to the whole SearchRequest body.Since the Search Request body is also needed by Multisearch, it was extracted as a separate class in the search package to that both Multisearch and StoredScript can use it (it was also ordered alphabetically).
source
in StoredScript is now an externally tagged union. (potentially breaking for generators)Ideally nothing else should be changed in the client codes as a result of this PR except for StoredScript, I'm setting this up as a draft for now, let me know when the generators are ready.