# Put mapping fails index\_already\_exists\_exception

**URL:** <https://discuss.elastic.co/t/put-mapping-fails-index-already-exists-exception/56782>\
**Category:** Elasticsearch\
**Created:** [July 29, 2016, 11:04pm UTC](https://discuss.elastic.co/t/put-mapping-fails-index-already-exists-exception/56782 "2016-07-29T23:04:38Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![vchav73](https://avatars.discourse-cdn.com/v4/letter/v/f475e1/32.png) [@vchav73](https://discuss.elastic.co/u/vchav73)\
**Post date:** [July 30, 2016, 7:09pm UTC](https://discuss.elastic.co/t/put-mapping-fails-index-already-exists-exception/56782/3 "2016-07-30T19:09:41Z")

</div>

When I read [the 2.3 doc](https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-put-mapping.html) on this I see this:

> The PUT mapping API allows you to add a new type to an existing index, or new fields to an existing type:

It then lists these three examples:

> PUT twitter  
> {  
> "mappings": {  
> "tweet": {  
> "properties": {  
> "message": {  
> "type": "string"  
> }  
> }  
> }  
> }  
> }

> PUT twitter/\_mapping/user  
> {  
> "properties": {  
> "name": {  
> "type": "string"  
> }  
> }  
> }

> PUT twitter/\_mapping/tweet  
> {  
> "properties": {  
> "user\_name": {  
> "type": "string"  
> }  
> }  
> }

To me, this implies that any of the three examples would all you to add a new type to an existing index. I now know, since I've tried the other two examples, that only the last two will add a new type to an existing index. At least to me, the doc is inconsistent with the observed behavior.

---

_[View the full topic](https://discuss.elastic.co/t/put-mapping-fails-index-already-exists-exception/56782)._
