You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ro...@apache.org on 2019/03/01 15:44:48 UTC

[lucene-solr] branch branch_8x updated (beda852 -> 5ca00c0)

This is an automated email from the ASF dual-hosted git repository.

romseygeek pushed a change to branch branch_8x
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git.


    from beda852  LUCENE-8709: Set pointWriter to null when size of the HeapPointWriter is 0
     new 8381b73  LUCENE-8715: Lucene70NormsFormat tests should test Lucene70NormsFormat
     new 5ca00c0  LUCENE-8714: Don't use NoMergePolicy in norms tests

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../lucene/codecs/lucene70/TestLucene70NormsFormat.java | 17 +++++++++++++++--
 .../apache/lucene/index/BaseNormsFormatTestCase.java    |  2 +-
 2 files changed, 16 insertions(+), 3 deletions(-)


[lucene-solr] 02/02: LUCENE-8714: Don't use NoMergePolicy in norms tests

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

romseygeek pushed a commit to branch branch_8x
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git

commit 5ca00c0b64fe2c2bce3b717be33c2237b68f5252
Author: Alan Woodward <ro...@apache.org>
AuthorDate: Fri Mar 1 14:45:05 2019 +0000

    LUCENE-8714: Don't use NoMergePolicy in norms tests
    
    This can cause spurious failures when run in conjunction with HandleLimitFS,
    as we can end up with lots of very small segments which trips the file handles
    limit
---
 .../src/java/org/apache/lucene/index/BaseNormsFormatTestCase.java       | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lucene/test-framework/src/java/org/apache/lucene/index/BaseNormsFormatTestCase.java b/lucene/test-framework/src/java/org/apache/lucene/index/BaseNormsFormatTestCase.java
index 6b301f9..e0e1f57 100644
--- a/lucene/test-framework/src/java/org/apache/lucene/index/BaseNormsFormatTestCase.java
+++ b/lucene/test-framework/src/java/org/apache/lucene/index/BaseNormsFormatTestCase.java
@@ -451,7 +451,7 @@ public abstract class BaseNormsFormatTestCase extends BaseIndexFileFormatTestCas
     
     Directory dir = applyCreatedVersionMajor(newDirectory());
     Analyzer analyzer = new MockAnalyzer(random(), MockTokenizer.WHITESPACE, false);
-    IndexWriterConfig conf = newIndexWriterConfig(analyzer).setMergePolicy(NoMergePolicy.INSTANCE);
+    IndexWriterConfig conf = newIndexWriterConfig(analyzer);
     CannedNormSimilarity sim = new CannedNormSimilarity(norms);
     conf.setSimilarity(sim);
     RandomIndexWriter writer = new RandomIndexWriter(random(), dir, conf);


[lucene-solr] 01/02: LUCENE-8715: Lucene70NormsFormat tests should test Lucene70NormsFormat

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

romseygeek pushed a commit to branch branch_8x
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git

commit 8381b7368de79a0e6c48e7022393fda31f0a9478
Author: Alan Woodward <ro...@apache.org>
AuthorDate: Fri Mar 1 14:46:31 2019 +0000

    LUCENE-8715: Lucene70NormsFormat tests should test Lucene70NormsFormat
---
 .../lucene/codecs/lucene70/TestLucene70NormsFormat.java | 17 +++++++++++++++--
 1 file changed, 15 insertions(+), 2 deletions(-)

diff --git a/lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene70/TestLucene70NormsFormat.java b/lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene70/TestLucene70NormsFormat.java
index f7d7714..d26761b 100644
--- a/lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene70/TestLucene70NormsFormat.java
+++ b/lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene70/TestLucene70NormsFormat.java
@@ -18,14 +18,27 @@ package org.apache.lucene.codecs.lucene70;
 
 
 import org.apache.lucene.codecs.Codec;
-import org.apache.lucene.codecs.lucene80.Lucene80Codec;
+import org.apache.lucene.codecs.FilterCodec;
+import org.apache.lucene.codecs.PostingsFormat;
+import org.apache.lucene.codecs.lucene50.Lucene50PostingsFormat;
+import org.apache.lucene.codecs.perfield.PerFieldPostingsFormat;
 import org.apache.lucene.index.BaseNormsFormatTestCase;
 
 /**
  * Tests Lucene70NormsFormat
  */
 public class TestLucene70NormsFormat extends BaseNormsFormatTestCase {
-  private final Codec codec = new Lucene80Codec();
+  private final Codec codec = new FilterCodec("Lucene70", new Lucene70Codec()) {
+    @Override
+    public PostingsFormat postingsFormat() {
+      return new PerFieldPostingsFormat() {
+        @Override
+        public PostingsFormat getPostingsFormatForField(String field) {
+          return new Lucene50PostingsFormat();
+        }
+      };
+    }
+  };
   
   @Override
   protected Codec getCodec() {