Allow script to have string or object value #2960
Draft
+3,867
−3,486
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.