Dynamically update "dynamic" field setting default value in Mappings Editor #98766
Labels
enhancement
New value added to drive a business result
Feature:Mappings Editor
Index mappings editor UI
Team:Kibana Management
Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more
Problem
Per conversation with @crisdarocha, if you set the index-level
dynamic
setting tofalse
, this change isn't surfaced in the field-leveldynamic
setting:What's confusing about this is that simply opening and closing the editor flyout for the field will affect the underlying ES request in confusing ways. If the user doesn't open the editor, the request doesn't specify a field-level
dynamic
setting, resulting in ES applying the index-leveldynamic: false
setting to this field:However, if the user opens and closes the editor (without changing any settings), the request will specify a field-level
dynamic: true
setting, which results in ES different behavior than above:Somewhat related to #52708, because this issue involves the application of ES defaults to the ES request.
Proposed solution
We can address this by dynamically (pun!) changing the
dynamic
field-level setting's default value, to match whatever has been set on index-level. This way when users edit a field they will see a default value for this setting that matches their expectations if they've changed the index-level setting. Per @sebelga this implementation should be straightforward. More time will be spent writing the tests than the implementation.The text was updated successfully, but these errors were encountered: