Elastitcsearch 7 : mapping types

I come across the following phrase and I am under impression that a valid 6.x query with type might give an error. I am using the cluster ES 7.10

Note that in 7.0, _doc is a permanent part of the path, and represents the endpoint name rather than the document type.

But, to my surprise, I am able to run the following query. Does it mean _doc is NOT permanent part of the path? In specific, what kind of queries I need to modify when I am moving from 6.x to 7.x

PUT ecommercesite/product/1
   "product_name": "Men High Performance Fleece Jacket",
   "description": "Best Value. All season fleece jacket",
   "unit_price": 79.99,
   "reviews": 250,
   "release_date": "2016-08-16"

And only the 6.x query, I am not able to run on 7.10. I got an error with respect to type.

GET ecommercesite/product/_mapping

There's some flexibility in v7 as we move to type-less in v8, which is why you are seeing this :slight_smile:

Ideally, you would be reindexing with the move to v7, moving your current type into the document as a new field, and then using the default _doc value.

gotcha, it was somewhat misleading when it says the path is permanent. BTW, what is the property that controls this flexibility

Not sure I follow on that last question sorry.

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