lucene-solr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From no...@apache.org
Subject svn commit: r781668 - in /lucene/solr/trunk/src/java/org/apache/solr/core: SolrConfig.java SolrCore.java
Date Thu, 04 Jun 2009 07:20:09 GMT
Author: noble
Date: Thu Jun  4 07:20:08 2009
New Revision: 781668

URL: http://svn.apache.org/viewvc?rev=781668&view=rev
Log:
SOLR-1198  unlockOnStartup, useColdSearcher, maxWarmingSearchers are moved to SolrConfig

Modified:
    lucene/solr/trunk/src/java/org/apache/solr/core/SolrConfig.java
    lucene/solr/trunk/src/java/org/apache/solr/core/SolrCore.java

Modified: lucene/solr/trunk/src/java/org/apache/solr/core/SolrConfig.java
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/src/java/org/apache/solr/core/SolrConfig.java?rev=781668&r1=781667&r2=781668&view=diff
==============================================================================
--- lucene/solr/trunk/src/java/org/apache/solr/core/SolrConfig.java (original)
+++ lucene/solr/trunk/src/java/org/apache/solr/core/SolrConfig.java Thu Jun  4 07:20:08 2009
@@ -141,8 +141,10 @@
       conf = new CacheConfig(FastLRUCache.class, args, null);
     }
     fieldValueCacheConfig = conf;
+    unlockOnStartup = getBool("mainIndex/unlockOnStartup", false);
+    useColdSearcher = getBool("query/useColdSearcher",false);
 
-    userCacheConfigs = CacheConfig.getMultipleConfigs(this, "query/cache");     
+    userCacheConfigs = CacheConfig.getMultipleConfigs(this, "query/cache");
 
     org.apache.solr.search.SolrIndexSearcher.initRegenerators(this);
 
@@ -160,6 +162,8 @@
     } else {
       jmxConfig = new JmxConfiguration(false, null, null);
     }
+     maxWarmingSearchers = getInt("query/maxWarmingSearchers",Integer.MAX_VALUE);
+
     
     Config.log.info("Loaded SolrConfig: " + name);
     
@@ -190,7 +194,11 @@
   // default & main index configurations
   public final SolrIndexConfig defaultIndexConfig;
   public final SolrIndexConfig mainIndexConfig;
-  
+
+  public final int maxWarmingSearchers;
+  public final boolean unlockOnStartup;
+  public final boolean useColdSearcher;
+
   //JMX configuration
   public final JmxConfiguration jmxConfig;
   

Modified: lucene/solr/trunk/src/java/org/apache/solr/core/SolrCore.java
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/src/java/org/apache/solr/core/SolrCore.java?rev=781668&r1=781667&r2=781668&view=diff
==============================================================================
--- lucene/solr/trunk/src/java/org/apache/solr/core/SolrCore.java (original)
+++ lucene/solr/trunk/src/java/org/apache/solr/core/SolrCore.java Thu Jun  4 07:20:08 2009
@@ -360,7 +360,7 @@
       synchronized (SolrCore.class) {
         firstTime = dirs.add(dirFile.getCanonicalPath());
       }
-      boolean removeLocks = solrConfig.getBool("mainIndex/unlockOnStartup", false);
+      boolean removeLocks = solrConfig.unlockOnStartup;
 
       initDirectoryFactory();
 
@@ -509,7 +509,7 @@
     this.dataDir = dataDir;
     this.solrConfig = config;
     this.startTime = System.currentTimeMillis();
-    this.maxWarmingSearchers = config.getInt("query/maxWarmingSearchers",Integer.MAX_VALUE);
+    this.maxWarmingSearchers = config.maxWarmingSearchers;
 
     booleanQueryMaxClauseCount();
   
@@ -1104,7 +1104,7 @@
         if (_searcher == null) {
           // if there isn't a current searcher then we may
           // want to register this one before warming is complete instead of waiting.
-          if (solrConfig.getBool("query/useColdSearcher",false)) {
+          if (solrConfig.useColdSearcher) {
             registerSearcher(newSearchHolder);
             decrementOnDeckCount[0]=false;
             alreadyRegistered=true;



Mime
View raw message