# Elasticsearch doc type deprecation: "doc" vs. "\_doc"

**URL:** https://discuss.elastic.co/t/elasticsearch-doc-type-deprecation-doc-vs-doc/139799
**Category:** Logstash
**Created:** [July 12, 2018, 5:01pm UTC](https://discuss.elastic.co/t/elasticsearch-doc-type-deprecation-doc-vs-doc/139799 "2018-07-12T17:01:16Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![jmb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jmb/32/14312_2.png) [@jmb](https://discuss.elastic.co/u/jmb)
#### Post date: [July 12, 2018, 5:01pm UTC](https://discuss.elastic.co/t/elasticsearch-doc-type-deprecation-doc-vs-doc/139799/1 "2018-07-12T17:01:16Z")

</div>

I'm trying to prepare for the eventual deprecation of document types in Elasticsearch, and it's not easy to nail down all conflicts. One that I'm blinking at at the moment is ['doc', '\_doc'] ...

The [Elasticsearch documentation](https://www.elastic.co/guide/en/elasticsearch/reference/current/removal-of-types.html#_schedule_for_removal_of_mapping_types) about removal of types says that

> 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`

On the other hand, the Logstash [6.3 Breaking Changes](https://www.elastic.co/guide/en/logstash/current/breaking-changes.html#_elasticsearch_output_changes) notes say

> The default document\_type has changed from logs to doc for consistency with Beats.

Sounds like the "consistency" should be driving in the other direction. Shouldn't both Logstash and Beats start to use `_doc` ? What is going to be best practice here?

---

<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: [August 9, 2018, 5:01pm UTC](https://discuss.elastic.co/t/elasticsearch-doc-type-deprecation-doc-vs-doc/139799/2 "2018-08-09T17:01:21Z")

</div>

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