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


Mapping types has deprecated since 6.x but when I check bulk api ,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?

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

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 ?

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

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