Merge changes Iac79af54,Ief41eccc,Iae52ade9,I0bd9eabb,I2ef5b9e1

* changes:
  Solr index requires SolrCloud rather than plain Solr
  Handle exceptions during reindexing
  InitIndex: Allow user to configure the Solr index URL
  Solr index URL should be configured under the main "index" section
  Improve information message about rebuilding the index
This commit is contained in:
Shawn Pearce
2014-02-13 17:02:23 +00:00
committed by Gerrit Code Review
4 changed files with 27 additions and 10 deletions

View File

@@ -143,11 +143,15 @@ public class Reindex extends SiteProgram {
sysManager.start();
index = sysInjector.getInstance(IndexCollection.class).getSearchIndex();
index.markReady(false);
index.deleteAll();
int result = indexAll();
index.markReady(true);
int result = 0;
try {
index.markReady(false);
index.deleteAll();
result = indexAll();
index.markReady(true);
} catch (Exception e) {
throw die(e.getMessage());
}
sysManager.stop();
dbManager.stop();
return result;