# Mappings of different types in one index

**URL:** <https://discuss.elastic.co/t/mappings-of-different-types-in-one-index/237717>\
**Category:** Elasticsearch\
**Created:** [June 19, 2020, 1:38am UTC](https://discuss.elastic.co/t/mappings-of-different-types-in-one-index/237717 "2020-06-19T01:38:31Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![lec\_ssmi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lec_ssmi/32/70666_2.png) [@lec\_ssmi](https://discuss.elastic.co/u/lec_ssmi)\
**Post date:** [June 19, 2020, 1:38am UTC](https://discuss.elastic.co/t/mappings-of-different-types-in-one-index/237717/1 "2020-06-19T01:38:31Z")

</div>

Excuse me, if there are two types in the same index, these two types have their own mapping. These two mappings use some fields with the same name, but the field types are different. Will there be conflict?

---

<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:** [June 19, 2020, 2:51am UTC](https://discuss.elastic.co/t/mappings-of-different-types-in-one-index/237717/2 "2020-06-19T02:51:24Z")

</div>

Welcome!

Having multiple types is not supported anymore. Types will be removed. Read [https://www.elastic.co/blog/removal-of-mapping-types-elasticsearch](https://www.elastic.co/blog/removal-of-mapping-types-elasticsearch)

---

<div class="post-metadata">

**Author:** ![lec\_ssmi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lec_ssmi/32/70666_2.png) [@lec\_ssmi](https://discuss.elastic.co/u/lec_ssmi)\
**Post date:** [June 19, 2020, 3:26am UTC](https://discuss.elastic.co/t/mappings-of-different-types-in-one-index/237717/3 "2020-06-19T03:26:25Z")

</div>

The version I use now is 5.8.x, and the type still works .

David Pilato via Discuss the Elastic Stack \<[elastic@discoursemail.com](mailto:elastic@discoursemail.com)\> 于2020年6月19日周五 上午11:01写道：

---

<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:** [June 19, 2020, 3:38am UTC](https://discuss.elastic.co/t/mappings-of-different-types-in-one-index/237717/4 "2020-06-19T03:38:48Z")

</div>

5.x is not supported anymore.  
Read the link I shared.  
Upgrade.

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [June 19, 2020, 4:26am UTC](https://discuss.elastic.co/t/mappings-of-different-types-in-one-index/237717/5 "2020-06-19T04:26:35Z")

</div>

No, I do not think that is allowed in Elasticsearch 5.x. If this remember correctly it was possible in much earlier versions but as it caused a lot of problems that was changed. Document types are now being deprecated completely so I recommend you adjust to this to simplify upgrading, which I also recommend you do.

---

<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:** [July 17, 2020, 4:26am UTC](https://discuss.elastic.co/t/mappings-of-different-types-in-one-index/237717/6 "2020-07-17T04:26:41Z")

</div>

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