Update field mappings

  • POST also PUT /{index}/_mapping

Add new fields to an existing data stream or index. You can use the update mapping API to:

  • Add a new field to an existing index
  • Update mappings for multiple indices in a single request
  • Add new properties to an object field
  • Enable multi-fields for an existing field
  • Update supported mapping parameters
  • Change a field's mapping using reindexing
  • Rename a field using a field alias

Learn how to use the update mapping API with practical examples in the Update mapping API examples guide.

  • Index privileges: manage
More about mapping parameters

Path Parameters

index union IndexName | [] IndexName required

A comma-separated list of index names the mapping should be added to (supports wildcards). Use _all or omit to add the mapping on all indices.

Response