-
Notifications
You must be signed in to change notification settings - Fork 98
Allow script to have string or object value #2960
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
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. 👍 |
The same change should be applied to |
762d4cc
to
8e5bcad
Compare
Following you can find the validation results for the APIs you have changed.
You can validate these APIs yourself by using the |
Following you can find the validation results for the APIs you have changed.
You can validate these APIs yourself by using the |
The backport to
To backport manually, run these commands in your terminal: # Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-9.0 9.0
# Navigate to the new working tree
cd .worktrees/backport-9.0
# Create a new branch
git switch --create backport-2960-to-9.0
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 1706b81e4754756bda1936bd4d4c34eac80dbe5e
# Push it to GitHub
git push --set-upstream origin backport-2960-to-9.0
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-9.0 Then, create a pull request where the |
* search body refactor + object script * many more scripts
The spec combined definitions for search and multisearch bodies in elastic/elasticsearch-specification#2960.
* Update helpers to use correct multisearch types The spec combined definitions for search and multisearch bodies in elastic/elasticsearch-specification#2960. * Stop copying project files to Dockerfile Slightly faster run times for codegen, hopefully.
* Update helpers to use correct multisearch types The spec combined definitions for search and multisearch bodies in elastic/elasticsearch-specification#2960. * Stop copying project files to Dockerfile Slightly faster run times for codegen, hopefully. (cherry picked from commit b2a4907)
* Update helpers to use correct multisearch types The spec combined definitions for search and multisearch bodies in elastic/elasticsearch-specification#2960. * Stop copying project files to Dockerfile Slightly faster run times for codegen, hopefully. (cherry picked from commit b2a4907) Co-authored-by: Josh Mock <joshua.mock@elastic.co>
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.