SOLR-1198

git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@788582 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Noble Paul 2009-06-26 05:34:24 +00:00
parent 9860cfab58
commit c51a5a2574
2 changed files with 8 additions and 2 deletions

View File

@ -151,6 +151,7 @@ public class SolrConfig extends Config {
fieldValueCacheConfig = conf;
unlockOnStartup = getBool("mainIndex/unlockOnStartup", false);
useColdSearcher = getBool("query/useColdSearcher",false);
dataDir = get("dataDir", null);
userCacheConfigs = CacheConfig.getMultipleConfigs(this, "query/cache");
@ -303,6 +304,7 @@ public class SolrConfig extends Config {
public final int maxWarmingSearchers;
public final boolean unlockOnStartup;
public final boolean useColdSearcher;
protected String dataDir;
//JMX configuration
public final JmxConfiguration jmxConfig;
@ -537,4 +539,6 @@ public class SolrConfig extends Config {
public List<PluginInfo> getHighlightingFormatterInfo() { return highlightingFormatterInfo; }
public List<PluginInfo> getHighlightingFragmenterInfo() { return highlightingFragmenterInfo; }
public String getDataDir() { return dataDir; }
}

View File

@ -492,8 +492,10 @@ public final class SolrCore implements SolrInfoMBean {
coreDescriptor = cd;
this.setName( name );
resourceLoader = config.getResourceLoader();
if (dataDir == null)
dataDir = config.get("dataDir",cd.getDataDir());
if (dataDir == null){
dataDir = config.getDataDir();
if(dataDir == null) dataDir = cd.getDataDir();
}
dataDir = SolrResourceLoader.normalizeDir(dataDir);