instanceDir = SolrResourceLoader.locateInstanceDir();
}
// Initialize
try {
CoreContainer cores = new CoreContainer(new SolrResourceLoader(instanceDir));
SolrConfig solrConfig = new SolrConfig(instanceDir, SolrConfig.DEFAULT_CONF_FILE, null);
CoreDescriptor dcore = new CoreDescriptor(cores, "", solrConfig.getResourceLoader().getInstanceDir());
IndexSchema indexSchema = new IndexSchema(solrConfig, instanceDir+"/conf/schema.xml", null);
core = new SolrCore( null, dataDir, solrConfig, indexSchema, dcore);
cores.register("", core, false);
parser = new SolrRequestParsers( solrConfig );
}
catch (Exception ee) {
throw new RuntimeException(ee);
}