0
votes

I have a large v5.3 SolrCloud index and I want to optimize only one shard. I've read that while the entire index may be optimized, it is not possible to optimize only a single shard. Still, I would like to make sure: http://grokbase.com/t/lucene/solr-user/153se1jvg4/optimize-solrcloud-without-downtime: "... with SolrCloud, any optimize command will optimize the entire collection, one shard replica at a time, regardless of any distrib parameter."

1

1 Answers

0
votes

As far as I can tell from the code, no, you can't call optimize on a single shard.

The quote you've included is however wrong (at least for certain versions of Solr) - any optimize do run in parallell across the collection (included in 4.10 and 6.0 at least, not sure about the 5 branch).

There is usually no need to actually call optimize, since the mergeFactor should handle this transparently for you. The exception is if you have a highly static index that never changes after initial processing and updates.

Also remember that an optimize will require at least 2x the disk space available, and that it will eat a lot of resources on the server where the index is being optimized.