-
Notifications
You must be signed in to change notification settings - Fork 25.2k
Reindexing from index with doc type to non-typed mapping fails #43100
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Pinging @elastic/es-distributed |
Pinging @elastic/es-search |
@hackery thanks for your interest in elasticsearch. I noticed that you are running version 6.8 but linking to "current" documentation. When I look in documentation for 6.8: https://www.elastic.co/guide/en/elasticsearch/reference/6.8/docs-reindex.html the type option seems to be described adequately. Please let us know if there is additional clarification necessary? |
The 6.8 reindex documentation also looks correct to me. The 'typeless' reindex + index APIs were only added in 7.0 and are not yet available in 6.x. So when the type is omitted for the destination index, reindex still uses the old behavior where the type is taken from documents in the I noticed in the removal of types documentation that we forget to specify the destination type when reindexing. This is probably causing confusion, I opened #45118 to address it. The behavior on 6.x is quite subtle, but I hope that the correction to the documentation will make it clearer for users what to do. We also have a blog post which goes through the 7.0 upgrade steps in detail: https://www.elastic.co/blog/moving-from-types-to-typeless-apis-in-elasticsearch-7-0 |
Previously, the reindex examples did not include `_doc` as the destination type. This would result in the reindex failing with the error "Rejecting mapping update to [users] as the final mapping would have more than 1 type: [_doc, user]". Relates to #43100.
Previously, the reindex examples did not include `_doc` as the destination type. This would result in the reindex failing with the error "Rejecting mapping update to [users] as the final mapping would have more than 1 type: [_doc, user]". Relates to #43100.
Previously, the reindex examples did not include `_doc` as the destination type. This would result in the reindex failing with the error "Rejecting mapping update to [users] as the final mapping would have more than 1 type: [_doc, user]". Relates to #43100.
Previously, the reindex examples did not include `_doc` as the destination type. This would result in the reindex failing with the error "Rejecting mapping update to [users] as the final mapping would have more than 1 type: [_doc, user]". Relates to #43100.
Previously, the reindex examples did not include `_doc` as the destination type. This would result in the reindex failing with the error "Rejecting mapping update to [users] as the final mapping would have more than 1 type: [_doc, user]". Relates to #43100.
Previously, the reindex examples did not include `_doc` as the destination type. This would result in the reindex failing with the error "Rejecting mapping update to [users] as the final mapping would have more than 1 type: [_doc, user]". Relates to #43100.
Previously, the reindex examples did not include `_doc` as the destination type. This would result in the reindex failing with the error "Rejecting mapping update to [users] as the final mapping would have more than 1 type: [_doc, user]". Relates to #43100.
Previously, the reindex examples did not include `_doc` as the destination type. This would result in the reindex failing with the error "Rejecting mapping update to [users] as the final mapping would have more than 1 type: [_doc, user]". Relates to #43100.
I'm going to close out this issue, thanks for raising it as it led to an important clarification in the docs. |
Elasticsearch version 6.8.0:
Plugins installed: None
JVM version Oracle 1.8.0_201
OS version Linux example 3.10.0-693.21.1.el7.x86_64 #1 SMP Wed Mar 7 19:03:37 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
We're working through the process to migrate to 7.x and remove any document types. All indices we have, have (always had) only one type (e.g. "events" or "transactions"). Trying a reindex from a "typed" index to an "untyped" one (specified with the same template with the type level removed and
?include_type_name=false
) gives a mapping conflict:It seems this should be disregarding the type of the source and honouring the un-typed template for creating the new index.
@dadoonet described a solution on the forum, but this situation and the "type" option should be described in the documentation.
Adding
"type": "_doc"
(notdoc
as given) worked for my reindexing.The text was updated successfully, but these errors were encountered: