elastic / elasticsearch-java

Official Elasticsearch Java Client
Apache License 2.0
409 stars 239 forks source link

Add support for shortcut properties of non-primitive type #858

Closed swallez closed 3 weeks ago

swallez commented 1 month ago

Adds an optional parameter to ObjectDeserializer.shortcutProperty to indicate if the shortcut property if of primitive type or not.

If it's not a primitive type shortcut, we look ahead in the JSON stream to see if the shortcut property exist. If it doesn't then this is a shortcut, and otherwise this is the normal shape of the object.

github-actions[bot] commented 3 weeks ago

The backport to 7.17 failed:

The process '/usr/bin/git' failed with exit code 1

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-7.17 7.17
# Navigate to the new working tree
cd .worktrees/backport-7.17
# Create a new branch
git switch --create backport-858-to-7.17
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick --mainline 1 1217de03eaf8bb7e8eaaa65762abdc3a3de23d4b
# Push it to GitHub
git push --set-upstream origin backport-858-to-7.17
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-7.17

Then, create a pull request where the base branch is 7.17 and the compare/head branch is backport-858-to-7.17.

github-actions[bot] commented 3 weeks ago

The backport to 8.15 failed:

The process '/usr/bin/git' failed with exit code 1

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-8.15 8.15
# Navigate to the new working tree
cd .worktrees/backport-8.15
# Create a new branch
git switch --create backport-858-to-8.15
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick --mainline 1 1217de03eaf8bb7e8eaaa65762abdc3a3de23d4b
# Push it to GitHub
git push --set-upstream origin backport-858-to-8.15
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-8.15

Then, create a pull request where the base branch is 8.15 and the compare/head branch is backport-858-to-8.15.