# With the removal of doc types, must I reindex all the indices that use a custom doc\_type?

**URL:** <https://discuss.elastic.co/t/with-the-removal-of-doc-types-must-i-reindex-all-the-indices-that-use-a-custom-doc-type/325419>\
**Category:** Elasticsearch\
**Created:** [February 13, 2023, 8:36pm UTC](https://discuss.elastic.co/t/with-the-removal-of-doc-types-must-i-reindex-all-the-indices-that-use-a-custom-doc-type/325419 "2023-02-13T20:36:59Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kexin-zhai](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kexin-zhai/32/117201_2.png) [@kexin-zhai](https://discuss.elastic.co/u/kexin-zhai)\
**Post date:** [February 13, 2023, 8:36pm UTC](https://discuss.elastic.co/t/with-the-removal-of-doc-types-must-i-reindex-all-the-indices-that-use-a-custom-doc-type/325419/1 "2023-02-13T20:36:59Z")

</div>

I have a similar question regarding the removal of doc types as @smlbiobot 's post here [With the removal of doc types, must I reindex all the indices that use a named type?](https://discuss.elastic.co/t/with-the-removal-of-doc-types-must-i-reindex-all-the-indices-that-use-a-named-type/237947) . Do I have to reindex all the indices before I upgrade, or can I upgrade and simply update requests to call \_doc type instead of custom type as ES will ignore custom type in indices?

My indices only have one custom doc type (not `_doc`) and are named in the format of `<index_name>-YYYY-MM-DD` (e.g., `filebeat-2023-02-13`). New documents will roll into a new index every day. I have updated index templates to use `_doc` type in preparation for the removal of doc types, so the new indices created after the day I updated the index template are indexing with `_doc` doc\_type. However, the indices created before the template was updated still have custom doc\_type. All indices were created in ES 6.x or ES 7.x (~OpenSearch1.3). Each of our indices has more than 23 million documents, so the reindex process is really time-consuming and involves a lot of manual labor. I would like to know if I had to reindex all the indices from a custom name doc type (e.g., `doc`, `event`, etc) to `_doc` type before the upgrade.

Any advice would be appreciated. Thank you!

---

<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 13, 2023, 8:37pm UTC](https://discuss.elastic.co/t/with-the-removal-of-doc-types-must-i-reindex-all-the-indices-that-use-a-custom-doc-type/325419/2 "2023-03-13T20:37:49Z")

</div>

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