if (zkHost != null && zkHost.length() > 0) {
if (collectionName == null || collectionName.length() == 0) {
throw new MorphlineCompilationException("Parameter 'zkHost' requires that you also pass parameter 'collection'", config);
}
try {
CloudSolrServer cloudSolrServer = new CloudSolrServer(zkHost);
cloudSolrServer.setDefaultCollection(collectionName);
cloudSolrServer.connect();
return cloudSolrServer;
} catch (MalformedURLException e) {
throw new MorphlineRuntimeException(e);
}
} else {