05-13-2017 02:03 AM - edited 05-13-2017 02:05 AM
I want to schedule a collection optimization which I daily manually perform in the Solr Admin UI,
and also I like to know How SolrCloudClient.optimize() method works in solrj library?
Becuase I want to perform a optimization in all shards of Collection which is avialble in different nodes at Single attempt for that I used below java to perform it
client = new CloudSolrClient(getZookeeperUrls());
final UpdateResponse response = client.optimize();
But optimiztion happening randomly after 3 to 4 attempts of above code execution.
Eventhough the optimization happened using the java code, But still solr admin UI have optimization button in the page.
What is the difference between the manuall doing optimization in Solr Admin UI vs using Solrj Library?
What is the recommeded way to schdeule Solr Collection optimization in all shards?