# How do I delete a single "Types" from Indices?

**URL:** <https://discuss.elastic.co/t/how-do-i-delete-a-single-types-from-indices/102329>\
**Category:** Elasticsearch\
**Created:** [September 30, 2017, 7:37am UTC](https://discuss.elastic.co/t/how-do-i-delete-a-single-types-from-indices/102329 "2017-09-30T07:37:11Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rahul\_Saxena](https://avatars.discourse-cdn.com/v4/letter/r/7993a0/32.png) [@Rahul\_Saxena](https://discuss.elastic.co/u/Rahul_Saxena)\
**Post date:** [September 30, 2017, 7:37am UTC](https://discuss.elastic.co/t/how-do-i-delete-a-single-types-from-indices/102329/1 "2017-09-30T07:37:11Z")

</div>

Hello there.  
I am new in elastic search and I'm .net developer. I am using elastic search nest for my data, having One Indices name "XYZ" having multiple Types named like "AA", "BB", "CC" and "DD".  
My question is that from multiple Types above mentioned I want to delete or remove particular Types "BB" with all data. Is this possible? How?

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [September 30, 2017, 7:43am UTC](https://discuss.elastic.co/t/how-do-i-delete-a-single-types-from-indices/102329/2 "2017-09-30T07:43:42Z")

</div>

[https://www.elastic.co/guide/en/elasticsearch/reference/5.6/docs-delete-by-query.html](https://www.elastic.co/guide/en/elasticsearch/reference/5.6/docs-delete-by-query.html)  
.  
It's better if you split things out into their own indices 🙂

---

<div class="post-metadata">

**Author:** ![Rahul\_Saxena](https://avatars.discourse-cdn.com/v4/letter/r/7993a0/32.png) [@Rahul\_Saxena](https://discuss.elastic.co/u/Rahul_Saxena)\
**Post date:** [September 30, 2017, 7:51am UTC](https://discuss.elastic.co/t/how-do-i-delete-a-single-types-from-indices/102329/3 "2017-09-30T07:51:31Z")

</div>

> [@warkolm](#):
>
> It's better if you split things out into their own indices

But I have code like this multiple Types into single Indices. For that I have to change whole code, and this is just an example. I have multiple numbers of Types into Multiple Indices. From that I have to remove or delete particular Types from its matching Indices.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [September 30, 2017, 8:19am UTC](https://discuss.elastic.co/t/how-do-i-delete-a-single-types-from-indices/102329/4 "2017-09-30T08:19:32Z")

</div>

You may want to read these blog posts;

- [https://www.elastic.co/blog/index-vs-type](https://www.elastic.co/blog/index-vs-type)
- [https://www.elastic.co/blog/index-type-parent-child-join-now-future-in-elasticsearch](https://www.elastic.co/blog/index-type-parent-child-join-now-future-in-elasticsearch)

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [September 30, 2017, 9:55am UTC](https://discuss.elastic.co/t/how-do-i-delete-a-single-types-from-indices/102329/5 "2017-09-30T09:55:13Z")

</div>

From 6.0 you can't create anymore multiple types per index.

Also even though in 5.x you can DELETE a type it is not going the remove the mapping but only documents.

Behind the scene it will mark documents as deleted. The actual removal will eventually happen later.  
Less efficient than deleting an index.

---

<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:** [October 28, 2017, 9:55am UTC](https://discuss.elastic.co/t/how-do-i-delete-a-single-types-from-indices/102329/6 "2017-10-28T09:55:18Z")

</div>

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