SOLR-350 -- allow configuration of dataDir via multicore.xml

git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@602003 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Ryan McKinley 2007-12-07 06:21:03 +00:00
parent 23ea243d95
commit c0d2db9a89
1 changed files with 2 additions and 1 deletions

View File

@ -99,6 +99,7 @@ public class MultiCore
try {
String name = DOMUtil.getAttr(node,"name", "Core needs a name" );
String instanceDir = DOMUtil.getAttr(node,"instanceDir", "Missing required 'instanceDir'" );
String dataDir = DOMUtil.getAttr(node,"dataDir", null );
String defaultStr = DOMUtil.getAttr(node,"default", null );
// Make the instanceDir relative to the core config
@ -109,7 +110,7 @@ public class MultiCore
SolrResourceLoader solrLoader = new SolrResourceLoader(instanceDir, libLoader);
SolrConfig solrConfig = new SolrConfig( solrLoader, SolrConfig.DEFAULT_CONF_FILE, null );
IndexSchema schema = new IndexSchema(solrConfig, instanceDir+"/conf/schema.xml");
SolrCore core = new SolrCore( name, null, solrConfig, schema );
SolrCore core = new SolrCore( name, dataDir, solrConfig, schema );
// Register the new core
SolrCore old = this.register( core );