Affects Version/s: None
Fix Version/s: None
In Lucene, an optimize() call iteratively merges segments until only one is left - and while it's merging it (ultimately) needs to make a copy of the entire index, because readers attempting to open the index "mid-optimize" need to see a consistent copy of the index.
In Solr, we have control over when new readers/searchers get opened, so what if when we recieved an <optimize/> command, we under the covers we made iterative partial optimize calls and only opened a new searcher when we were finished with all of them? In theory this seems like it would help reduce the disk space used during optimize, without really affecting the time it takes to "optimize"
These are the threads that prompted this idea...