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