} else if(!indexMetadata.isActive()){ //already managed, but not active
//try to activate
try {
IndexMetadata activatedMetadata = managedSolrServer.activateIndex(indexReference.getIndex());
if(activatedMetadata == null){
throw new YardException(String.format(
"Unable to actiate SolrIndex '%s' for SolrYard '%s" +
"on MnagedSolrServer '%s'!",indexReference,
getConfig().getName(),managedSolrServer.getServerName()));
} else {
return activatedMetadata.getIndexReference();
}
} catch (IOException e) {
throw new YardException("Unable to actiate SolrIndex for SolrYard "+getConfig().getName(),e);
} catch (SAXException e) {
throw new YardException("Unable to actiate SolrIndex for SolrYard "+getConfig().getName(),e);
} catch (RuntimeException e){
throw new YardException("Unable to actiate SolrIndex for SolrYard "+getConfig().getName(),e);
}
} else{ //already active ... noting todo
return indexReference;
}
} else { //indexReference.getServer() != managedSolrServer.getServerName