mirror of https://github.com/apache/lucene.git
SOLR-1580: Solr Configuration ignores 'mergeFactor' parameter, always uses Lucene default.
git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@883388 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
dc18c42b6b
commit
e745742505
|
@ -73,6 +73,9 @@ Bug Fixes
|
|||
* 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
|
||||
|
|
|
@ -86,8 +86,9 @@ public class SolrIndexWriter extends IndexWriter {
|
|||
|
||||
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.");
|
||||
}
|
||||
|
||||
|
|
|
@ -30,6 +30,7 @@ import org.apache.solr.core.SolrCore;
|
|||
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 class BasicFunctionalityTest extends AbstractSolrTestCase {
|
|||
}
|
||||
|
||||
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")
|
||||
|
|
|
@ -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.
|
||||
-->
|
||||
|
|
Loading…
Reference in New Issue