# Elastitcsearch 7 : mapping types

**URL:** <https://discuss.elastic.co/t/elastitcsearch-7-mapping-types/258584>\
**Category:** Elasticsearch\
**Created:** [December 14, 2020, 2:12pm UTC](https://discuss.elastic.co/t/elastitcsearch-7-mapping-types/258584 "2020-12-14T14:12:18Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![nages](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nages/32/46943_2.png) [@nages](https://discuss.elastic.co/u/nages)\
**Post date:** [December 14, 2020, 2:12pm UTC](https://discuss.elastic.co/t/elastitcsearch-7-mapping-types/258584/1 "2020-12-14T14:12:18Z")

</div>

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

```auto
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.

```auto
GET ecommercesite/product/_mapping

```

---

<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:** [December 14, 2020, 9:15pm UTC](https://discuss.elastic.co/t/elastitcsearch-7-mapping-types/258584/2 "2020-12-14T21:15:46Z")

</div>

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

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.

---

<div class="post-metadata">

**Author:** ![nages](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nages/32/46943_2.png) [@nages](https://discuss.elastic.co/u/nages)\
**Post date:** [December 15, 2020, 3:42am UTC](https://discuss.elastic.co/t/elastitcsearch-7-mapping-types/258584/3 "2020-12-15T03:42:33Z")

</div>

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

---

<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:** [December 15, 2020, 3:55am UTC](https://discuss.elastic.co/t/elastitcsearch-7-mapping-types/258584/4 "2020-12-15T03:55:16Z")

</div>

Not sure I follow on that last question sorry.

---

<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:** [January 12, 2021, 3:55am UTC](https://discuss.elastic.co/t/elastitcsearch-7-mapping-types/258584/5 "2021-01-12T03:55:46Z")

</div>

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