Hi All, I am still very new to solr. Currently I am facing problem to use EmbeddedSolrServer. following is my code:
File home = new File("D:/ranveer/java/solr_home/solr/first"); CoreContainer coreContainer = new CoreContainer(); SolrConfig config = null; config = new SolrConfig(home + "/core1","solrconfig.xml",null); CoreDescriptor descriptor = new CoreDescriptor(coreContainer,"core1",home + "/core1"); SolrCore core = new SolrCore("core1", home+"/core1/data", config, new IndexSchema(config, "schema.xml",null), descriptor); coreContainer.register(core.getName(), core, true); final EmbeddedSolrServer server = new EmbeddedSolrServer(coreContainer, "core1"); Now my problem is every time when I making request for search SolrCore is initializing the core. I want if the core/instance of core is already start then just use previously started core. Due to this problem right now searching is taking too much time. I tried to close core after search but same thing when fresh search result is made, solr is starting from very basic. please help.. thanks