-
Notifications
You must be signed in to change notification settings - Fork 258
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
Serialize DynamicMapping values as booleans instead of string #139
Comments
Thanks for the report. There are a few places where Elasticsearch accepts either a boolean or a string constant, hence the use of an enumeration with Elasticsearch is lenient and happily accepts a string for boolean values, so this is usually not an issue. In the particular case of templates however, they're stored and sent back "as is" when Kibana fetches the template definition. The issue could be solved on either side (client library or Kibana), but I think that the client should send a JSON boolean, which is semantically more correct. |
Another manifestation of the same issue, but when |
Fixes #123809 ## Summary This PR adds support for the `'true'`, `'false'`, and `'runtime'` values for the `dynamic` field of index templates as they are [supported by Elasticsearch](https://www.elastic.co/guide/en/elasticsearch/reference/8.6/dynamic.html#dynamic-parameters). Before these changes, setting one of these values for the `dynamic` field would cause a `MultipleMappingsWarning` message when editing the Mappings section as described in the scenario in #123809. Regarding the string values `'true'` and `'false'`, according to elastic/elasticsearch-java#139, "Elasticsearch is lenient and happily accepts a string for boolean values", which is why we need to add support for these two values in Kibana. https://user-images.githubusercontent.com/59341489/217516509-88679c38-271c-4c7d-9145-27c7f9cfa8ca.mov ### Checklist - [X] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios
Seems like Kibana has problems displaying index templates created with dynamic mappings set to
DynamicMapping.False
. Please see issue:elastic/kibana#123809
I guess Kibana should be able to handle this, but also, maybe
DynamicMapping
generate boolean values instead of string values?The text was updated successfully, but these errors were encountered: