lucene-solr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From markrmil...@apache.org
Subject svn commit: r883388 - in /lucene/solr/trunk: CHANGES.txt src/java/org/apache/solr/update/SolrIndexWriter.java src/test/org/apache/solr/BasicFunctionalityTest.java src/test/test-files/solr/conf/solrconfig.xml
Date Mon, 23 Nov 2009 16:12:13 GMT
Author: markrmiller
Date: Mon Nov 23 16:12:12 2009
New Revision: 883388

URL: http://svn.apache.org/viewvc?rev=883388&view=rev
Log:
SOLR-1580: Solr Configuration ignores 'mergeFactor' parameter, always uses Lucene default.

Modified:
    lucene/solr/trunk/CHANGES.txt
    lucene/solr/trunk/src/java/org/apache/solr/update/SolrIndexWriter.java
    lucene/solr/trunk/src/test/org/apache/solr/BasicFunctionalityTest.java
    lucene/solr/trunk/src/test/test-files/solr/conf/solrconfig.xml

Modified: lucene/solr/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/CHANGES.txt?rev=883388&r1=883387&r2=883388&view=diff
==============================================================================
--- lucene/solr/trunk/CHANGES.txt (original)
+++ lucene/solr/trunk/CHANGES.txt Mon Nov 23 16:12:12 2009
@@ -73,6 +73,9 @@
 * SOLR-1584: SolrJ - SolrQuery.setIncludeScore() incorrectly added
   fl=score to the parameter list instead of appending score to the
   existing field list. (yonik)
+  
+* SOLR-1580: Solr Configuration ignores 'mergeFactor' parameter, always 
+  uses Lucene default. (Lance Norskog via Mark Miller)
 
 * SOLR-1593: ReverseWildcardFilter didn't work for surrogate pairs
   (i.e. code points outside of the BMP), resulting in incorrect

Modified: lucene/solr/trunk/src/java/org/apache/solr/update/SolrIndexWriter.java
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/src/java/org/apache/solr/update/SolrIndexWriter.java?rev=883388&r1=883387&r2=883388&view=diff
==============================================================================
--- lucene/solr/trunk/src/java/org/apache/solr/update/SolrIndexWriter.java (original)
+++ lucene/solr/trunk/src/java/org/apache/solr/update/SolrIndexWriter.java Mon Nov 23 16:12:12
2009
@@ -86,8 +86,9 @@
 
       if (getMergePolicy() instanceof LogMergePolicy) {
         setUseCompoundFile(config.useCompoundFile);
+        if (config.mergeFactor != -1) { setMergeFactor(config.mergeFactor); }
       } else  {
-        log.warn("Use of compound file format cannot be configured if merge policy is not
an instance " +
+        log.warn("Use of compound file format or mergefactor cannot be configured if merge
policy is not an instance " +
                 "of LogMergePolicy. The configured policy's defaults will be used.");
       }
 

Modified: lucene/solr/trunk/src/test/org/apache/solr/BasicFunctionalityTest.java
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/src/test/org/apache/solr/BasicFunctionalityTest.java?rev=883388&r1=883387&r2=883388&view=diff
==============================================================================
--- lucene/solr/trunk/src/test/org/apache/solr/BasicFunctionalityTest.java (original)
+++ lucene/solr/trunk/src/test/org/apache/solr/BasicFunctionalityTest.java Mon Nov 23 16:12:12
2009
@@ -30,6 +30,7 @@
 import org.apache.solr.search.*;
 import org.apache.solr.handler.*;
 import org.apache.solr.request.*;
+import org.apache.solr.update.SolrIndexWriter;
 import org.apache.solr.util.*;
 import org.apache.solr.schema.*;
 
@@ -112,6 +113,11 @@
   }
 
   public void testSomeStuff() throws Exception {
+	// test merge factor picked up
+	SolrCore core = h.getCore();
+	SolrIndexWriter writer = new SolrIndexWriter("testWriter",core.getNewIndexDir(), core.getDirectoryFactory(),
false, core.getSchema(), core.getSolrConfig().mainIndexConfig, core.getDeletionPolicy());
+	assertEquals("Mergefactor was not picked up", writer.getMergeFactor(), 8);
+	  
     lrf.args.put("version","2.0");
     assertQ("test query on empty index",
             req("qlkciyopsbgzyvkylsjhchghjrdf")

Modified: lucene/solr/trunk/src/test/test-files/solr/conf/solrconfig.xml
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/src/test/test-files/solr/conf/solrconfig.xml?rev=883388&r1=883387&r2=883388&view=diff
==============================================================================
--- lucene/solr/trunk/src/test/test-files/solr/conf/solrconfig.xml (original)
+++ lucene/solr/trunk/src/test/test-files/solr/conf/solrconfig.xml Mon Nov 23 16:12:12 2009
@@ -102,7 +102,7 @@
   <mainIndex>
     <!-- lucene options specific to the main on-disk lucene index -->
     <useCompoundFile>false</useCompoundFile>
-    <mergeFactor>10</mergeFactor>
+    <mergeFactor>8</mergeFactor>
     <!-- for better multi-segment testing, we are using slower
     indexing properties of maxBufferedDocs=10 and LogDocMergePolicy.
     -->



Mime
View raw message