# Optimize indices

**URL:** <https://discuss.elastic.co/t/optimize-indices/12441>\
**Category:** Elasticsearch\
**Created:** [June 17, 2013, 5:48am UTC](https://discuss.elastic.co/t/optimize-indices/12441 "2013-06-17T05:48:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ankit\_Jain](https://avatars.discourse-cdn.com/v4/letter/a/96bed5/32.png) [@Ankit\_Jain](https://discuss.elastic.co/u/Ankit_Jain)\
**Post date:** [June 17, 2013, 5:48am UTC](https://discuss.elastic.co/t/optimize-indices/12441/1 "2013-06-17T05:48:02Z")

</div>

Hi All,

We are indexing streaming data into ES. I would like to know about the  
ideal optimize strategy for our usecase. Also, we have required to delete  
historical indices and index mapping. As we will delete the indices and  
index mapping, the disk space will free only after running the optimize  
command.

Please suggest an ideal optimize approach?

Thanks,  
Ankit Jain

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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:** [June 17, 2013, 6:08am UTC](https://discuss.elastic.co/t/optimize-indices/12441/2 "2013-06-17T06:08:53Z")

</div>

True if you delete mapping. Wrong if you delete index.

Delete the full index if you can. It is really really faster than deleting a mapping (means deleting all docs for this type). Basically, it's a rm -rf on each node which is extremly fast and frees your disk space immediatly.

--  
David 😉  
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 17 juin 2013 à 07:48, Ankit Jain [ankitjaincs06@gmail.com](mailto:ankitjaincs06@gmail.com) a écrit :

Hi All,

We are indexing streaming data into ES. I would like to know about the ideal optimize strategy for our usecase. Also, we have required to delete historical indices and index mapping. As we will delete the indices and index mapping, the disk space will free only after running the optimize command.

Please suggest an ideal optimize approach?

## Thanks, Ankit Jain

You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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:** [July 6, 2017, 2:30am UTC](https://discuss.elastic.co/t/optimize-indices/12441/3 "2017-07-06T02:30:56Z")

</div>


