# Allowing multiple mappings in Elastic Search 6

**URL:** https://discuss.elastic.co/t/allowing-multiple-mappings-in-elastic-search-6/262864
**Category:** Elasticsearch
**Created:** [February 1, 2021, 4:31pm UTC](https://discuss.elastic.co/t/allowing-multiple-mappings-in-elastic-search-6/262864 "2021-02-01T16:31:21Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Jack4](https://avatars.discourse-cdn.com/v4/letter/j/ecd19e/32.png) [@Jack4](https://discuss.elastic.co/u/Jack4)
#### Post date: [February 1, 2021, 4:31pm UTC](https://discuss.elastic.co/t/allowing-multiple-mappings-in-elastic-search-6/262864/1 "2021-02-01T16:31:21Z")

</div>

Hi All,

I am upgrading from Elastic 5.6.16 to 6.8.13 and it's complaining about  
"Rejecting mapping update to...as the final mapping would have more than 1 type"

Without switching to single mapping, is there a workaround to use multiple mapping in ElasticSearch 6?

I have tried updating the Index settings with: "index.mapping.single\_type": "false"  
but it complains about that setting not being a thing.

Does anyone have any other recommendations/ways to resolve this?

Thanks!

---

<div class="post-metadata">

### Author: ![whatgeorgemade](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/whatgeorgemade/32/103246_2.png) [@whatgeorgemade](https://discuss.elastic.co/u/whatgeorgemade)
#### Post date: [February 1, 2021, 4:59pm UTC](https://discuss.elastic.co/t/allowing-multiple-mappings-in-elastic-search-6/262864/2 "2021-02-01T16:59:41Z")

</div>

Hi there,

Welcome to the forum!

There's no way to create an index with multiple types in Elasticsearch 6, I'm afraid.

Some options for dealing with this are mentioned in [this blog post](https://www.elastic.co/blog/removal-of-mapping-types-elasticsearch).

I hope this helps.

George.

---

<div class="post-metadata">

### Author: ![Jack4](https://avatars.discourse-cdn.com/v4/letter/j/ecd19e/32.png) [@Jack4](https://discuss.elastic.co/u/Jack4)
#### Post date: [February 1, 2021, 5:21pm UTC](https://discuss.elastic.co/t/allowing-multiple-mappings-in-elastic-search-6/262864/3 "2021-02-01T17:21:02Z")

</div>

> [@whatgeorgemade](#):
>
> There's no way to create an index with multiple types in Elasticsearch 6, I'm afraid.

Hi George,

Thanks for your reply! However, on this page: [Removal of mapping types | Elasticsearch Guide [6.8] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/6.8/removal-of-types.html)

I see that it says, " Indices created in 5.x with multiple mapping types will continue to function as before in Elasticsearch 6.x."

Is this not true?

Thanks!

---

<div class="post-metadata">

### Author: ![whatgeorgemade](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/whatgeorgemade/32/103246_2.png) [@whatgeorgemade](https://discuss.elastic.co/u/whatgeorgemade)
#### Post date: [February 1, 2021, 5:45pm UTC](https://discuss.elastic.co/t/allowing-multiple-mappings-in-elastic-search-6/262864/4 "2021-02-01T17:45:59Z")

</div>

I've gone through this before but it was a while ago, so forgive me if I'm contradicting myself.

You might be able to update your cluster from 5.6 to 6.8 and still use your **existing** indices with multiple types but you won't be able to create a **new** index in 6.8 and use multiple types.

When you set `index.mapping.single_type`, did you do so in Elasticsearch 5 or 6? If memory serves, you need to set it in your v5 index before you upgrade to 6. Then 6 might still use your multi-type indices. I think the setting is read-only in 6 onwards.

I would advise dealing with the issue ASAP. I don't think you'll be able to re-index a multi-type index you created in Elasticsearch 5 once you upgrade to 6.

---

<div class="post-metadata">

### Author: ![Jack4](https://avatars.discourse-cdn.com/v4/letter/j/ecd19e/32.png) [@Jack4](https://discuss.elastic.co/u/Jack4)
#### Post date: [February 1, 2021, 6:23pm UTC](https://discuss.elastic.co/t/allowing-multiple-mappings-in-elastic-search-6/262864/5 "2021-02-01T18:23:26Z")

</div>

Hi George,

I am setting `index.mapping.single_type` after updating to version 6. So do you think if i set this in version 5 and then do the update, it will work for sure?

Thanks!

---

<div class="post-metadata">

### Author: ![whatgeorgemade](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/whatgeorgemade/32/103246_2.png) [@whatgeorgemade](https://discuss.elastic.co/u/whatgeorgemade)
#### Post date: [February 1, 2021, 8:14pm UTC](https://discuss.elastic.co/t/allowing-multiple-mappings-in-elastic-search-6/262864/6 "2021-02-01T20:14:44Z")

</div>

It **may** do. I can't remember the exact ins-and-outs, and don't have clusters to try it on, but I think setting that option in 5 and upgrading the node to 6 is more likely to work.

---

<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: [March 1, 2021, 8:14pm UTC](https://discuss.elastic.co/t/allowing-multiple-mappings-in-elastic-search-6/262864/7 "2021-03-01T20:14:50Z")

</div>

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