-
Notifications
You must be signed in to change notification settings - Fork 115
Remove UserDefinedValue from FieldValue
#3687
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
Conversation
|
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 |
|
Following you can find the validation results for the API you have changed.
You can validate this API yourself by using the |
|
Info: We decided to keep the ES|QL definition as is, even though this will prevent named parameters from being used. The inherent problem with the ES|QL parameters definition will be fixed in a separate PR (which will cause a breaking change). |
|
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-8.x 8.x
# Navigate to the new working tree
cd .worktrees/backport-8.x
# Create a new branch
git switch --create backport-3687-to-8.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 97160e198d14bed12e704be8eb34204828dcbc97
# Push it to GitHub
git push --set-upstream origin backport-3687-to-8.x
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-8.xThen, create a pull request where 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-8.18 8.18
# Navigate to the new working tree
cd .worktrees/backport-8.18
# Create a new branch
git switch --create backport-3687-to-8.18
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 97160e198d14bed12e704be8eb34204828dcbc97
# Push it to GitHub
git push --set-upstream origin backport-3687-to-8.18
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-8.18Then, create a pull request where the |
(cherry picked from commit 97160e1)
Some types like e.g.
TermQueryhave a shortcut to a property with theFieldValuetype.According to the specification,
FieldValuewas allowed to containUserDefinedValue/any. This complicates deserialization in the shortcut property case since we can't simply rely on the JSON token type (!= Object) to know that we are handling a shortcut property. While this can be worked around, I still started to check, ifFieldValueshould even be supposed to contain non-scalar values.@pquentin checked the validation results and found 3 issues:
FieldValue[]but named parameters like{"n1": 300}are allowed.Checking these cases shows the following:
We know that ESQL params are currently not modelled in the best way possible.
Proposal: Replace with
UserDefinedValueuntil we fixed the core issue.https://www.elastic.co/guide/en/elasticsearch/reference/current/search-fields.html#retrieve-unmapped-fields
According to this quote, we are currently using the wrong type as the returned values are not canonical field-values:
Proposal: Replace with
UserDefinedValue.The first test is wrong
"error": true. The second test is syntactically valid, but according to another test @pquentin did, does not return semantically correct results.Conclusion: Remove/ignore these tests and continue to use
FieldValue.Request:
Response: