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:20:26 UTC

lucene-solr:branch_6x: 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/branch_6x 67d206c66 -> 1a0786332


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/1a078633
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/1a078633
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/1a078633

Branch: refs/heads/branch_6x
Commit: 1a0786332d16eaefde013a4e075658387a3ae382
Parents: 67d206c
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:12 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/1a078633/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);
     }