Allowing multiple mappings in Elastic Search 6

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!

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.

I hope this helps.

George.

Hi George,

Thanks for your reply! However, on this page: Removal of mapping types | Elasticsearch Guide [6.8] | Elastic

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!

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.

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!

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.

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