How to setup Spring Data Solr with EmbeddedSolrServer and multicore support? - Stack Overflow
This can at this time not be done directly due to DATASOLR-203.
Once the issue mentioned above is resolved you can do it as follows:
@Configuration @EnableSolrRepositories(multicoreSupport = true) static class SolrConfiguration { @Bean SolrServer solrServer() throws FileNotFoundException { String solrHome = ResourceUtils.getURL("classpath:your/path/here").getPath(); CoreContainer container = CoreContainer.createAndLoad(solrHome, new File(solrHome + "/solr.xml")); return new EmbeddedSolrServer(container, null); } }
Read full article from How to setup Spring Data Solr with EmbeddedSolrServer and multicore support? - Stack Overflow
No comments:
Post a Comment