question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Deprecation of mapping types doc vs _doc

See original GitHub issue

In the last merge the mapping types were deprecated in order to comply with ES 7.0

I am a bit confused between “doc” and “_doc”, I think ES-dsl-py is using “doc” as the default index type (and you cannot change it anymore)

https://www.elastic.co/guide/en/elasticsearch/reference/master/removal-of-types.html#_schedule_for_removal_of_mapping_types

Indices created in 6.x only allow a single-type per index. Any name can be used for the type, but there can be only one. The preferred type name is _doc, so that index APIs have the same path as they will have in 7.0: PUT {index}/_doc/{id} and POST {index}/_doc

Does this mean that the documents created with ES dsl py will have not work with the ES7 POST {index}/_doc ?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
Mekkcommented, Apr 20, 2019

I tried using elasticseach-dsl for the first time and got errors caused by ES 7.0 incompatibility (my server is 7.0 already). Both attempt to create mapping, and attempt to search fail. Are fixes made here released?

0reactions
0Ariancommented, Dec 27, 2019

I need a way to change ‘doc’ to ‘_doc’ … it seems to be static

body['doc'] = {

@littlehome-eugene Have you figured out a way to do so? I have the same problem

Read more comments on GitHub >

github_iconTop Results From Across the Web

Removal of mapping types | Elasticsearch Guide [7.17] | Elastic
Types are deprecated in APIs in 7.0, with breaking changes to the index creation, put mapping, get mapping, put template, get template and...
Read more >
The Removal of Mapping Types in Elasticsearch 6 | Logz.io
The removal of Elasticsearch mapping types is a process that has taken a serious step forward in version 6. Here's what you need...
Read more >
what does _doc represents in elasticsearch? - Stack Overflow
_doc is a mapping type, which by the way is now deprecated. A mapping type used to be a separate collection inside the...
Read more >
Elasticsearch Mapping _type is deprecated (#5) · Issues - GitLab
Types will be deprecated in APIs in Elasticsearch 7.0.0, and completely removed in 8.0.0. This doc contains all the useful information which ...
Read more >
Mapping update rejected by primary - how to solve ... - Opster
But since mapping types were deprecated in ES version 6, users can only use one mapping type. You can either keep the mapping...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found