From c0d2db9a89c5fea4c78e1e4edea67fe6e6108794 Mon Sep 17 00:00:00 2001 From: Ryan McKinley Date: Fri, 7 Dec 2007 06:21:03 +0000 Subject: [PATCH] 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 --- src/java/org/apache/solr/core/MultiCore.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/java/org/apache/solr/core/MultiCore.java b/src/java/org/apache/solr/core/MultiCore.java index fa68a3feea1..d60e46d3e46 100644 --- a/src/java/org/apache/solr/core/MultiCore.java +++ b/src/java/org/apache/solr/core/MultiCore.java @@ -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 );