Update data stream settings

  • PUT /_data_stream/{name}/_settings
Auth
Note

Available in 8.19. Not available in earlier versions.

This API can be used to override settings on specific data streams. These overrides will take precedence over what is specified in the template that the data stream matches. To prevent your data stream from getting into an invalid state, only certain settings are allowed. If possible, the setting change is applied to all backing indices. Otherwise, it will be applied when the data stream is next rolled over.

Required privileges

Index privileges manage

Path parameters

name union string | string[] required

A comma-separated list of data streams or data stream patterns.

Query parameters

dry_run boolean · default: false

If true, the request does not actually change the settings on any data streams or indices. Instead, it simulates changing the settings and reports back to the user what would have happened had these settings actually been applied.

master_timeout union oneOf · default: 30s

The period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error.

Values: -1 0
timeout union oneOf · default: 30s

The period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.

Values: -1 0

Request body

mode string
routing_path union string | string[]
number_of_shards number | string · default: 1
number_of_replicas number | string · default: 0
number_of_routing_shards number
check_on_startup enum · default: false
Values: true false checksum
codec string · default: LZ4
routing_partition_size number | string · default: 1
load_fixed_bitset_filters_eagerly boolean · default: true
hidden boolean | string · default: false
auto_expand_replicas union string · default: false nullable
Same fields as search in index
refresh_interval union oneOf · default: 1s
Values: -1 0
max_result_window number | string · default: 10000
max_inner_result_window number · default: 100
max_rescore_window number · default: 10000
max_script_fields number · default: 32
max_ngram_diff number · default: 1
max_shingle_diff number · default: 3
max_refresh_listeners number
max_terms_count number · default: 65536
max_regex_length number · default: 1000
routing object
Same fields as routing in index
gc_deletes union oneOf · default: 60s
Values: -1 0
default_pipeline string · default: _none
final_pipeline string · default: _none
provided_name string
creation_date union oneOf
One of: number or string
creation_date_string union oneOf
One of: string or number
uuid string
verified_before_close boolean | string
format number | string
max_slices_per_scroll number
priority number | string
top_metrics_max_size number
analysis object
Same fields as analysis in index
settings object
Same fields as index
similarity map string to oneOf

Configure custom similarity settings to customize how search results are scored.

mapping object

Enable or disable dynamic mapping for an index.

Same fields as mapping in index

Response

application/json
data_streams object[] required
name string required

The data stream name.

applied_to_data_stream boolean required

If the settings were successfully applied to the data stream (or would have been, if running in dry_run mode), it is true. If an error occurred, it is false.

error string

A message explaining why the settings could not be applied to the data stream.

settings object required

The settings that are specfic to this data stream that will override any settings from the matching index template.

Same fields as index
effective_settings object required

The settings that are effective on this data stream, taking into account the settings from the matching index template and the settings specific to this data stream.

Same fields as index
index_settings_results object required

Information about whether and where each setting was applied.

applied_to_data_stream_only string[] required

The list of settings that were applied to the data stream but not to backing indices. These will be applied to the write index the next time the data stream is rolled over.

applied_to_data_stream_and_backing_indices string[] required

The list of settings that were applied to the data stream and to all of its backing indices. These settings will also be applied to the write index the next time the data stream is rolled over.