# With removal of mapping types, should bulk api update as well?

**URL:** <https://discuss.elastic.co/t/with-removal-of-mapping-types-should-bulk-api-update-as-well/152376>\
**Category:** Elasticsearch\
**Created:** [October 14, 2018, 7:24am UTC](https://discuss.elastic.co/t/with-removal-of-mapping-types-should-bulk-api-update-as-well/152376 "2018-10-14T07:24:30Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![qiulang](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/qiulang/32/35928_2.png) [@qiulang](https://discuss.elastic.co/u/qiulang)\
**Post date:** [October 14, 2018, 7:24am UTC](https://discuss.elastic.co/t/with-removal-of-mapping-types-should-bulk-api-update-as-well/152376/1 "2018-10-14T07:24:30Z")

</div>

Hi,

Mapping types has [deprecated since 6.x](https://www.elastic.co/guide/en/elasticsearch/reference/master/removal-of-types.html#removal-of-types) but when I check [bulk api](https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-bulk.html) ,it still uses type as example,

```
POST _bulk
{ "index" : { "_index" : "test", "_type" : "_doc", "_id" : "1" } }
{ "field1" : "value1" } 

```

So will `"_type"` parameter change in the future as well?

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [October 14, 2018, 2:19pm UTC](https://discuss.elastic.co/t/with-removal-of-mapping-types-should-bulk-api-update-as-well/152376/2 "2018-10-14T14:19:36Z")

</div>

It will change in the future yes.  
For now using \_doc as the type name is perfect.

---

<div class="post-metadata">

**Author:** ![qiulang](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/qiulang/32/35928_2.png) [@qiulang](https://discuss.elastic.co/u/qiulang)\
**Post date:** [October 14, 2018, 3:01pm UTC](https://discuss.elastic.co/t/with-removal-of-mapping-types-should-bulk-api-update-as-well/152376/3 "2018-10-14T15:01:21Z")

</div>

Thanks for reply. I have made my mapping without type, "an index per document type" as suggest, e.g.

```
"mappings": {
    "user": {
      "properties": {
         ...
      }
    }
 }

```

So when call bulk api, if I still provide "\_type" parameter, as in  
`{ "index" : { "_index" : "test", "_type" : "user"}}` I feel it is a bit against the purpose of removal of mapping types. Is n't it ?

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [October 14, 2018, 7:55pm UTC](https://discuss.elastic.co/t/with-removal-of-mapping-types-should-bulk-api-update-as-well/152376/4 "2018-10-14T19:55:52Z")

</div>

The removal is happening in stages to make it easier for people to adapt.

---

<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:** [November 11, 2018, 8:09pm UTC](https://discuss.elastic.co/t/with-removal-of-mapping-types-should-bulk-api-update-as-well/152376/5 "2018-11-11T20:09:27Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
