You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by mi...@apache.org on 2016/10/13 14:21:15 UTC

lucene-solr:master: LUCENE-7491: also allow for merging segment with points before one without points for a given field (thank you MockRandomMergePolicy!)

Repository: lucene-solr
Updated Branches:
  refs/heads/master 4ae1643f6 -> f4d3ca898


LUCENE-7491: also allow for merging segment with points before one without points for a given field (thank you MockRandomMergePolicy!)


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/f4d3ca89
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/f4d3ca89
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/f4d3ca89

Branch: refs/heads/master
Commit: f4d3ca89802d06087780d7b7a1e7516c6b0f94c7
Parents: 4ae1643
Author: Mike McCandless <mi...@apache.org>
Authored: Thu Oct 13 10:20:12 2016 -0400
Committer: Mike McCandless <mi...@apache.org>
Committed: Thu Oct 13 10:20:38 2016 -0400

----------------------------------------------------------------------
 lucene/core/src/java/org/apache/lucene/index/FieldInfo.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/f4d3ca89/lucene/core/src/java/org/apache/lucene/index/FieldInfo.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/java/org/apache/lucene/index/FieldInfo.java b/lucene/core/src/java/org/apache/lucene/index/FieldInfo.java
index 1118f27..4e02320 100644
--- a/lucene/core/src/java/org/apache/lucene/index/FieldInfo.java
+++ b/lucene/core/src/java/org/apache/lucene/index/FieldInfo.java
@@ -145,7 +145,7 @@ public final class FieldInfo {
     if (this.pointDimensionCount == 0 && dimensionCount != 0) {
       this.pointDimensionCount = dimensionCount;
       this.pointNumBytes = dimensionNumBytes;
-    } else if (this.pointDimensionCount != dimensionCount || this.pointNumBytes != dimensionNumBytes) {
+    } else if (dimensionCount != 0 && (this.pointDimensionCount != dimensionCount || this.pointNumBytes != dimensionNumBytes)) {
       throw new IllegalArgumentException("cannot change field \"" + name + "\" from points dimensionCount=" + this.pointDimensionCount + ", numBytes=" + this.pointNumBytes + " to inconsistent dimensionCount=" + dimensionCount + ", numBytes=" + dimensionNumBytes);
     }