* @param home: The path to the Solr home directory
* @return EmbeddedSolrServer: The instantiated server
* @throws Exception if any errors occur
*/
private EmbeddedSolrServer startSolr(String home) throws Exception {
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 solrCore = new SolrCore(null, solrConfig.getDataDir(),
solrConfig, schema, descriptor);
solrContainer.register("", solrCore, false);
return new EmbeddedSolrServer(solrContainer, "");
}