|
1 |
| -[role="xpack"] |
| 1 | +[[modify-data-streams]] |
| 2 | +== Modify a data stream |
| 3 | + |
| 4 | +[discrete] |
2 | 5 | [[data-streams-change-mappings-and-settings]]
|
3 |
| -== Change mappings and settings for a data stream |
| 6 | +=== Change mappings and settings for a data stream |
4 | 7 |
|
5 | 8 | Each data stream has a <<create-index-template,matching index
|
6 | 9 | template>>. Mappings and index settings from this template are applied to new
|
@@ -82,7 +85,7 @@ DELETE /_ilm/policy/my-data-stream-policy
|
82 | 85 |
|
83 | 86 | [discrete]
|
84 | 87 | [[add-new-field-mapping-to-a-data-stream]]
|
85 |
| -=== Add a new field mapping to a data stream |
| 88 | +==== Add a new field mapping to a data stream |
86 | 89 |
|
87 | 90 | To add a mapping for a new field to a data stream, following these steps:
|
88 | 91 |
|
@@ -161,7 +164,7 @@ PUT /my-data-stream/_mapping?write_index_only=true
|
161 | 164 |
|
162 | 165 | [discrete]
|
163 | 166 | [[change-existing-field-mapping-in-a-data-stream]]
|
164 |
| -=== Change an existing field mapping in a data stream |
| 167 | +==== Change an existing field mapping in a data stream |
165 | 168 |
|
166 | 169 | The documentation for each <<mapping-params,mapping parameter>> indicates
|
167 | 170 | whether you can update it for an existing field using the
|
@@ -269,7 +272,7 @@ data stream and reindex your data into it. See
|
269 | 272 |
|
270 | 273 | [discrete]
|
271 | 274 | [[change-dynamic-index-setting-for-a-data-stream]]
|
272 |
| -=== Change a dynamic index setting for a data stream |
| 275 | +==== Change a dynamic index setting for a data stream |
273 | 276 |
|
274 | 277 | To change a <<index-modules-settings,dynamic index setting>> for a data stream,
|
275 | 278 | follow these steps:
|
@@ -326,7 +329,7 @@ policy. See <<switch-lifecycle-policies>>.
|
326 | 329 |
|
327 | 330 | [discrete]
|
328 | 331 | [[change-static-index-setting-for-a-data-stream]]
|
329 |
| -=== Change a static index setting for a data stream |
| 332 | +==== Change a static index setting for a data stream |
330 | 333 |
|
331 | 334 | <<index-modules-settings,Static index settings>> can only be set when a backing
|
332 | 335 | index is created. You cannot update static index settings using the
|
@@ -371,7 +374,7 @@ new data stream and reindex your data into it. See
|
371 | 374 |
|
372 | 375 | [discrete]
|
373 | 376 | [[data-streams-use-reindex-to-change-mappings-settings]]
|
374 |
| -=== Use reindex to change mappings or settings |
| 377 | +==== Use reindex to change mappings or settings |
375 | 378 |
|
376 | 379 | You can use a reindex to change the mappings or settings of a data stream. This
|
377 | 380 | is often required to change the data type of an existing field or update static
|
@@ -481,15 +484,16 @@ to create this data stream>>. Later, you will reindex older data from an
|
481 | 484 | existing data stream into this new stream. This could result in one or more
|
482 | 485 | backing indices that contains a mix of new and old data.
|
483 | 486 | +
|
484 |
| -[[data-stream-mix-new-old-data]] |
485 |
| -.Mixing new and old data in a data stream |
486 | 487 | [IMPORTANT]
|
487 |
| -==== |
| 488 | +====== |
| 489 | +[[data-stream-mix-new-old-data]] |
| 490 | +*Mixing new and old data in a data stream* |
| 491 | +
|
488 | 492 | While mixing new and old data is safe, it could interfere with data retention.
|
489 | 493 | If you delete older indices, you could accidentally delete a backing index that
|
490 | 494 | contains both new and old data. To prevent premature data loss, you would need
|
491 | 495 | to retain such a backing index until you are ready to delete its newest data.
|
492 |
| -==== |
| 496 | +====== |
493 | 497 | +
|
494 | 498 | --
|
495 | 499 | The following create data stream API request targets `new-data-stream`, which
|
@@ -683,3 +687,13 @@ backing indices and any data they contain.
|
683 | 687 | DELETE /_data_stream/my-data-stream
|
684 | 688 | ----
|
685 | 689 | --
|
| 690 | + |
| 691 | +[discrete] |
| 692 | +[[data-streams-change-alias]] |
| 693 | +=== Update or add an alias to a data stream |
| 694 | + |
| 695 | +Use the <<indices-aliases,aliases API>> to update an existing data stream's |
| 696 | +aliases. Changing an existing data stream's aliases in its index pattern has no |
| 697 | +effect. |
| 698 | + |
| 699 | +include::../alias.asciidoc[tag=alias-multiple-actions-example] |
0 commit comments