* @return EmbeddedSolrServer: The instantiated server
* @throws Exception if any errors occur
*/
private EmbeddedSolrServer startSolr(String home) throws Exception {
try {
SolrConfig solrConfig = new SolrConfig(home, SOLR_CONFIG, null);
IndexSchema schema = new IndexSchema(solrConfig, SOLR_SCHEMA, null);
solrContainer = new CoreContainer(new SolrResourceLoader(
SolrResourceLoader.locateSolrHome()));
CoreDescriptor descriptor = new CoreDescriptor(solrContainer, "",
solrConfig.getResourceLoader().getInstanceDir());
descriptor.setConfigName(solrConfig.getResourceName());
descriptor.setSchemaName(schema.getResourceName());
solrCore = new SolrCore(null, solrConfig.getDataDir(),
solrConfig, schema, descriptor);
solrContainer.register("", solrCore, false);
return new EmbeddedSolrServer(solrContainer, "");
} catch(Exception ex) {
log.error("\nFailed to start Solr server\n");