<p dir="auto">The <code class="notranslate">_optimize</code> API is great for improving performance of time series indices or other cold indices, but the name of it is incredibly misleading.</p>
<p dir="auto">Lucene changed from calling it <code class="notranslate">optimize</code> to <code class="notranslate">forceMerge</code> back in Lucene 3.5 (<a href="http://blog.trifork.com/2011/11/21/simon-says-optimize-is-bad-for-you/" rel="nofollow">from this blast in the past</a>, eh <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/s1monw/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/s1monw">@s1monw</a>!). Maybe it's time that we change it too?</p>
<p dir="auto">Optimize is a very costly operation, and rarely necessary.  I think it's trappy because it's name is so tempting, and also because in ES the optimize is done in the background (so the request returns immediately), hiding the true cost.</p>
<p dir="auto">There are times when it's appropriate, e.g. in the logging use case when you know a given daily index is done, but for most cases it's not a good idea to optimize.</p>
<p dir="auto">I think we should follow Lucene here and rename it to forceMerge and deprecate optimize.</p>