// create the embedded server
CoreContainer coreContainer = new CoreContainer(solrFolder.getAbsolutePath(), solrFile);
CoreDescriptor coreDescriptor = new CoreDescriptor(coreContainer, coreId,
solrCoreFolder.getAbsolutePath());
SolrCore core = coreContainer.create(coreDescriptor);
coreContainer.register(coreId, core, true);
return new EmbeddedSolrServer(coreContainer, coreId);
}
}