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

This commit is contained in:
Mike McCandless 2016-10-13 10:20:12 -04:00
parent 4ae1643f66
commit f4d3ca8980
1 changed files with 1 additions and 1 deletions

View File

@ -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);
}