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

(Qiulang) #1


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?

(David Pilato) #2

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

(Qiulang) #3

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 ?

(Mark Walkom) #4

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

(system) #5

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