elastic / kibana

Your window into the Elastic Stack
https://www.elastic.co/products/kibana
Other
19.48k stars 8.04k forks source link

[Index Management] Improve index settings editor #175714

Open yuliacech opened 5 months ago

yuliacech commented 5 months ago

Read only display

The settings tab in the index details page displays a read-only code block with a JSON object returned from the request GET <index_name>/_settings?expand_wildcards=none&flat_settings=false&local=false&include_defaults=true (see this file).

Screenshot 2024-01-25 at 16 31 35

Edit mode

When "edit" mode is toggled, the code block is replaced by a code editor, where a subset of settings is displayed even though the user is free to use the editor and change any settings they want.

Screenshot 2024-01-25 at 15 26 21

The subset of settings is selected as follows (see this file): On stateful

  1. From the defaults returned by the above request, only those are picked that are in the list below
    [
    'index.number_of_replicas',
    'index.blocks.read_only_allow_delete',
    'index.codec',
    'index.priority',
    'index.query.default_field',
    'index.refresh_interval',
    'index.write.wait_for_active_shards',
    ]
  2. Additionally all settings returned by the above request, all are displayed except those in the list below
    [
    'index.creation_date',
    'index.number_of_shards',
    'index.provided_name',
    'index.uuid',
    'index.version.created',
    'index.compound_format',
    'index.data_path',
    'index.format',
    'index.number_of_routing_shards',
    'index.sort.field',
    'index.sort.missing',
    'index.sort.mode',
    'index.sort.order',
    'index.routing_partition_size',
    'index.store.type',
    ]

    On serverless

    • From defaults and settings only those are picked that are in the list below (only those are available on serverless)
      [
      'index.blocks.write',
      'index.blocks.read',
      'index.blocks.read_only',
      'index.blocks.metadata',
      'index.codec',
      'index.default_pipeline',
      'index.lifecycle.origination_date',
      'index.final_pipeline',
      'index.similarity',
      'index.analysis',
      'index.query.default_field',
      'index.refresh_interval',
      'index.query_string.lenient',
      'index.sort.missing',
      'index.sort.order',
      'index.sort.mode',
      'index.sort.field',
      'index.mapping.ignore_malformed',
      'index.mapping.coerce',
      'index.mapping.total_fields.limit',
      'index.merge.policy.deletes_pct_allowed',
      'index.merge.policy.max_merge_at_once',
      'index.merge.policy.expunge_deletes_allowed',
      'index.merge.policy.floor_segment',
      ]

These lists of index defaults and settings that are displayed or hidden in the editor need to be updated and verified with the Elasticsearch team. Also a more structured UI for index setting editing could be useful: for a set of defaults/settings that are expected to be changed often by users, we could provide more usable form inputs (similar to Mappings editor in the index template creation wizard for example).

elasticmachine commented 5 months ago

Pinging @elastic/platform-deployment-management (Team:Deployment Management)