-
Notifications
You must be signed in to change notification settings - Fork 102
fix 'runtime' property type in DynamicTemplate class #3847
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
fix 'runtime' property type in DynamicTemplate class #3847
Conversation
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.
This seems correct to me. We don't have any YAML tests on this, only Java tests (that should probably have been YAML tests.) runtime
, like mapping
is parsed as a Map<String, Object>
, which isn't helpful:
But there's a unit test that shows that runtime
is parsed as RuntimeField:
This is what the mappings look like in JSON:
"dynamic_templates": [
{
"my_template": {
"match_mapping_type": "*",
"runtime": {
"type": "{dynamic_type}",
"foo": "bar"
}
}
}
]
And the error is unknown parameter [foo] on runtime field [__dynamic__my_template] of type [date]
which is raised by the RuntimeField
class:
LGTM!
(cherry picked from commit 86bbcf8)
(cherry picked from commit 86bbcf8)
Thanks for the merge @pquentin ! |
(cherry picked from commit 86bbcf8) Co-authored-by: Fabien Baligand <[email protected]>
(cherry picked from commit 86bbcf8) Co-authored-by: Fabien Baligand <[email protected]>
(cherry picked from commit 86bbcf8)
Merci pour la contribution ! This will be released in version 8.18 and above of the Elasticsearch clients. |
(cherry picked from commit 86bbcf8) Co-authored-by: Fabien Baligand <[email protected]>
Super! |
Currently, in DynamicTemplate class, the "runtime" property has "Property" type.
This PR aims to fix that by referencing "RuntimeField" type.