Skip to content
Merged
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions docs/reference/indices/put-mapping.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,11 @@
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.
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.

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.

Expand Down