Skip to content
Index lifecycleElasticsearch

PUT <index>/_mapping

PUT <index>/_mappingPUT <index>/_settings

Update mappings or adjust index settings after creation.

Command
curl -X PUT "http://:9200//_mapping?pretty" -H 'Content-Type: application/json' -d '{"properties":{"user":{"type":"keyword"}}}'

Example usage

Define field mappings or tune refresh and replica settings.

curl -X PUT "http://<host>:9200/<index>/_mapping?pretty" -H 'Content-Type: application/json' -d '{"properties":{"user":{"type":"keyword"}}}'
curl -X PUT "http://<host>:9200/<index>/_settings?pretty" -H 'Content-Type: application/json' -d '{"index":{"refresh_interval":"30s"}}'

Related tags

Index lifecyclePUT <index>/_settingssearchobservabilityrest-api