# Mapping API does not automatically create the index

**URL:** <https://discuss.elastic.co/t/mapping-api-does-not-automatically-create-the-index/861>\
**Category:** Elasticsearch\
**Created:** [May 18, 2015, 6:57pm UTC](https://discuss.elastic.co/t/mapping-api-does-not-automatically-create-the-index/861 "2015-05-18T18:57:17Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rectalogic](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rectalogic/32/44827_2.png) [@rectalogic](https://discuss.elastic.co/u/rectalogic)\
**Post date:** [May 18, 2015, 6:57pm UTC](https://discuss.elastic.co/t/mapping-api-does-not-automatically-create-the-index/861/1 "2015-05-18T18:57:17Z")

</div>

According to this bug, the mapping API was enhanced to automatically create the index. But this doesn't seem to happen with ES 1.4.4 or 1.5.2

> <https://github.com/elastic/elasticsearch/issues/12>
>
> In a similar manner that the index operation automatically create the index, the mapping API should do the same. This can...

```
curl -XPUT http://localhost:9200/twitter/tweet/_mapping -d '
{
    tweet : {
        properties : {
            message : {type : "string", store : "yes"}
        }
    }
}
'
{"error":"IndexMissingException[[twitter] missing]","status":404}
```

---

<div class="post-metadata">

**Author:** ![jpountz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jpountz/32/45836_2.png) [@jpountz](https://discuss.elastic.co/u/jpountz)\
**Post date:** [May 19, 2015, 9:52am UTC](https://discuss.elastic.co/t/mapping-api-does-not-automatically-create-the-index/861/2 "2015-05-19T09:52:21Z")

</div>

The expected behaviour today is that calling the put mapping API should not create the index.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 12:13am UTC](https://discuss.elastic.co/t/mapping-api-does-not-automatically-create-the-index/861/3 "2017-07-06T00:13:22Z")

</div>


