From ad7690e5fcd35c3aebb44e0402bb153cba59f4e3 Mon Sep 17 00:00:00 2001 From: Kofi B Date: Wed, 15 Jan 2025 17:03:06 -0800 Subject: [PATCH 1/8] Update put mapping --- docs/reference/indices/put-mapping.asciidoc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/reference/indices/put-mapping.asciidoc b/docs/reference/indices/put-mapping.asciidoc index 479bdff22a80c..d22301968687a 100644 --- a/docs/reference/indices/put-mapping.asciidoc +++ b/docs/reference/indices/put-mapping.asciidoc @@ -10,8 +10,10 @@ For the most up-to-date API details, refer to {api-es}/group/endpoint-indices[Index APIs]. -- -Adds new fields to an existing data stream or index. You can also use this -API to change the search settings of existing fields. +Changing a field type in Elasticsearch is often done to improve query performance, enhance search relevance, or resolve data type mismatches (e.g., converting a text field to a keyword field for faster aggregations). However, keep in mind that Elasticsearch does not allow in-place field type changes: you’ll need to create a new index with the updated mapping and reindex the data. However, if the existing data is malformed or incompatible with the updated field type, such as attempting to convert a text field to a date field, it may result in data loss during ingestion. + +You can also use this +API to change the mappings of existing fields. For data streams, these changes are applied to all backing indices by default. From 452f577b3dcce86c965ce9e954a2e88658eda5df Mon Sep 17 00:00:00 2001 From: Kofi B Date: Wed, 15 Jan 2025 20:53:16 -0800 Subject: [PATCH 2/8] Small adjustment --- docs/reference/indices/put-mapping.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/reference/indices/put-mapping.asciidoc b/docs/reference/indices/put-mapping.asciidoc index d22301968687a..672640ddacccf 100644 --- a/docs/reference/indices/put-mapping.asciidoc +++ b/docs/reference/indices/put-mapping.asciidoc @@ -12,7 +12,7 @@ For the most up-to-date API details, refer to {api-es}/group/endpoint-indices[In Changing a field type in Elasticsearch is often done to improve query performance, enhance search relevance, or resolve data type mismatches (e.g., converting a text field to a keyword field for faster aggregations). However, keep in mind that Elasticsearch does not allow in-place field type changes: you’ll need to create a new index with the updated mapping and reindex the data. However, if the existing data is malformed or incompatible with the updated field type, such as attempting to convert a text field to a date field, it may result in data loss during ingestion. -You can also use this +You can use this API to change the mappings of existing fields. For data streams, these changes are applied to all backing indices by default. From 49bcbf5e02b978be294db0aea6c387460c7ce9f7 Mon Sep 17 00:00:00 2001 From: Kofi B Date: Wed, 15 Jan 2025 20:54:17 -0800 Subject: [PATCH 3/8] Order of paragraphs --- docs/reference/indices/put-mapping.asciidoc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/reference/indices/put-mapping.asciidoc b/docs/reference/indices/put-mapping.asciidoc index 672640ddacccf..4accd579e4ffa 100644 --- a/docs/reference/indices/put-mapping.asciidoc +++ b/docs/reference/indices/put-mapping.asciidoc @@ -10,10 +10,10 @@ For the most up-to-date API details, refer to {api-es}/group/endpoint-indices[Index APIs]. -- -Changing a field type in Elasticsearch is often done to improve query performance, enhance search relevance, or resolve data type mismatches (e.g., converting a text field to a keyword field for faster aggregations). However, keep in mind that Elasticsearch does not allow in-place field type changes: you’ll need to create a new index with the updated mapping and reindex the data. However, if the existing data is malformed or incompatible with the updated field type, such as attempting to convert a text field to a date field, it may result in data loss during ingestion. -You can use this -API to change the mappings of existing fields. +You can use this API to change the mappings of existing fields. + +Changing a field type in Elasticsearch is often done to improve query performance, enhance search relevance, or resolve data type mismatches (e.g., converting a text field to a keyword field for faster aggregations). However, keep in mind that Elasticsearch does not allow in-place field type changes: you’ll need to create a new index with the updated mapping and reindex the data. However, if the existing data is malformed or incompatible with the updated field type, such as attempting to convert a text field to a date field, it may result in data loss during ingestion. For data streams, these changes are applied to all backing indices by default. From 53aeba61b663a56dd7b2fd7edd9f9d3c1fa75cd6 Mon Sep 17 00:00:00 2001 From: Kofi Bartlett Date: Wed, 29 Jan 2025 14:02:32 -0500 Subject: [PATCH 4/8] Rewording and clarification --- docs/reference/indices/put-mapping.asciidoc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/reference/indices/put-mapping.asciidoc b/docs/reference/indices/put-mapping.asciidoc index 4accd579e4ffa..8701682a3feb4 100644 --- a/docs/reference/indices/put-mapping.asciidoc +++ b/docs/reference/indices/put-mapping.asciidoc @@ -11,9 +11,11 @@ For the most up-to-date API details, refer to {api-es}/group/endpoint-indices[In -- -You can use this API to change the mappings of existing fields. +You can use this API to add new fields to an existing index. However, Elasticsearch does not allow in-place field type changes. If you need to change a field’s type, you must create a new index with the updated mapping and reindex the data. -Changing a field type in Elasticsearch is often done to improve query performance, enhance search relevance, or resolve data type mismatches (e.g., converting a text field to a keyword field for faster aggregations). However, keep in mind that Elasticsearch does not allow in-place field type changes: you’ll need to create a new index with the updated mapping and reindex the data. However, if the existing data is malformed or incompatible with the updated field type, such as attempting to convert a text field to a date field, it may result in data loss during ingestion. +Changing field types is often done to improve query performance, enhance search relevance, or resolve data type mismatches (e.g., converting a text field to a keyword field for faster aggregations). However, if the existing data is malformed or incompatible with the updated field type, such as attempting to convert a text field to a date field, it may result in data loss during ingestion. + +You can also use this API to change the search settings of existing fields. For data streams, these changes are applied to all backing indices by default. From 18ab82db8b9794b2dd6a44182ef9db1195327941 Mon Sep 17 00:00:00 2001 From: Kofi Bartlett Date: Wed, 29 Jan 2025 14:02:35 -0500 Subject: [PATCH 5/8] Rewording and clarification --- docs/reference/indices/put-mapping.asciidoc | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/reference/indices/put-mapping.asciidoc b/docs/reference/indices/put-mapping.asciidoc index 8701682a3feb4..44a8a1853e8de 100644 --- a/docs/reference/indices/put-mapping.asciidoc +++ b/docs/reference/indices/put-mapping.asciidoc @@ -10,7 +10,6 @@ For the most up-to-date API details, refer to {api-es}/group/endpoint-indices[Index APIs]. -- - You can use this API to add new fields to an existing index. However, Elasticsearch does not allow in-place field type changes. If you need to change a field’s type, you must create a new index with the updated mapping and reindex the data. Changing field types is often done to improve query performance, enhance search relevance, or resolve data type mismatches (e.g., converting a text field to a keyword field for faster aggregations). However, if the existing data is malformed or incompatible with the updated field type, such as attempting to convert a text field to a date field, it may result in data loss during ingestion. From da36ee1cdfc3ee6c3e79f319b13058ddea23f3d8 Mon Sep 17 00:00:00 2001 From: Kofi B Date: Wed, 29 Jan 2025 11:23:04 -0800 Subject: [PATCH 6/8] Update docs/reference/indices/put-mapping.asciidoc Co-authored-by: Liam Thompson <32779855+leemthompo@users.noreply.github.com> --- docs/reference/indices/put-mapping.asciidoc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/reference/indices/put-mapping.asciidoc b/docs/reference/indices/put-mapping.asciidoc index 44a8a1853e8de..80aacdff2ad44 100644 --- a/docs/reference/indices/put-mapping.asciidoc +++ b/docs/reference/indices/put-mapping.asciidoc @@ -10,7 +10,12 @@ For the most up-to-date API details, refer to {api-es}/group/endpoint-indices[Index APIs]. -- -You can use this API to add new fields to an existing index. However, Elasticsearch does not allow in-place field type changes. If you need to change a field’s type, you must create a new index with the updated mapping and reindex the data. +You can use this API to: + +* Add new fields to an existing index +* Change the search settings of existing fields + +NOTE: Elasticsearch does not allow in-place field type changes. If you need to change a field’s type, you must create a new index with the updated mapping and <> the data. Changing field types is often done to improve query performance, enhance search relevance, or resolve data type mismatches (e.g., converting a text field to a keyword field for faster aggregations). However, if the existing data is malformed or incompatible with the updated field type, such as attempting to convert a text field to a date field, it may result in data loss during ingestion. From cbd4e3554e8fbebef2d577e0aefee33045f4d46c Mon Sep 17 00:00:00 2001 From: Kofi B Date: Wed, 29 Jan 2025 11:23:11 -0800 Subject: [PATCH 7/8] Update docs/reference/indices/put-mapping.asciidoc Co-authored-by: Liam Thompson <32779855+leemthompo@users.noreply.github.com> --- docs/reference/indices/put-mapping.asciidoc | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/reference/indices/put-mapping.asciidoc b/docs/reference/indices/put-mapping.asciidoc index 80aacdff2ad44..ae2f4e33dfd63 100644 --- a/docs/reference/indices/put-mapping.asciidoc +++ b/docs/reference/indices/put-mapping.asciidoc @@ -17,7 +17,6 @@ You can use this API to: NOTE: Elasticsearch does not allow in-place field type changes. If you need to change a field’s type, you must create a new index with the updated mapping and <> the data. -Changing field types is often done to improve query performance, enhance search relevance, or resolve data type mismatches (e.g., converting a text field to a keyword field for faster aggregations). However, if the existing data is malformed or incompatible with the updated field type, such as attempting to convert a text field to a date field, it may result in data loss during ingestion. You can also use this API to change the search settings of existing fields. From 974d1cf01f1312ce22701711b8ab0a38709b812c Mon Sep 17 00:00:00 2001 From: Kofi B Date: Wed, 29 Jan 2025 11:23:18 -0800 Subject: [PATCH 8/8] Update docs/reference/indices/put-mapping.asciidoc Co-authored-by: Liam Thompson <32779855+leemthompo@users.noreply.github.com> --- docs/reference/indices/put-mapping.asciidoc | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/reference/indices/put-mapping.asciidoc b/docs/reference/indices/put-mapping.asciidoc index ae2f4e33dfd63..a377f92d6cfd3 100644 --- a/docs/reference/indices/put-mapping.asciidoc +++ b/docs/reference/indices/put-mapping.asciidoc @@ -18,7 +18,6 @@ You can use this API to: NOTE: Elasticsearch does not allow in-place field type changes. If you need to change a field’s type, you must create a new index with the updated mapping and <> the data. -You can also use this API to change the search settings of existing fields. For data streams, these changes are applied to all backing indices by default.