diff --git a/lucene/CHANGES.txt b/lucene/CHANGES.txt index 4fe37df567a..aea1bacf45b 100644 --- a/lucene/CHANGES.txt +++ b/lucene/CHANGES.txt @@ -134,12 +134,6 @@ New Features of footer, this can detect some forms of corruption such as truncation. (Robert Muir) -* LUCENE-5843: Added IndexWriter.MAX_DOCS which is the maximum number - of documents allowed in a single index, and any operations that add - documents will now throw IllegalStateException if the max count - would be exceeded, instead of silently creating an unusable - index. (Mike McCandless) - API Changes * LUCENE-5752: Simplified Automaton API to be immutable. (Mike McCandless) @@ -221,6 +215,12 @@ Bug Fixes Integer.MAX_VALUE - 8 for the maximum array size. (Robert Muir, Mike McCandless) +* LUCENE-5843: Added IndexWriter.MAX_DOCS which is the maximum number + of documents allowed in a single index, and any operations that add + documents will now throw IllegalStateException if the max count + would be exceeded, instead of silently creating an unusable + index. (Mike McCandless) + Test Framework * LUCENE-5786: Unflushed/ truncated events file (hung testing subprocess). diff --git a/lucene/core/src/java/org/apache/lucene/codecs/blocktree/SegmentTermsEnum.java b/lucene/core/src/java/org/apache/lucene/codecs/blocktree/SegmentTermsEnum.java index 182587fc51d..0bf7b55e168 100644 --- a/lucene/core/src/java/org/apache/lucene/codecs/blocktree/SegmentTermsEnum.java +++ b/lucene/core/src/java/org/apache/lucene/codecs/blocktree/SegmentTermsEnum.java @@ -913,7 +913,9 @@ final class SegmentTermsEnum extends TermsEnum { // Pop finished blocks while (currentFrame.nextEnt == currentFrame.entCount) { if (!currentFrame.isLastInFloor) { + // Advance to next floor block currentFrame.loadNextFloorBlock(); + break; } else { //if (DEBUG) System.out.println(" pop frame"); if (currentFrame.ord == 0) { diff --git a/lucene/core/src/java/org/apache/lucene/codecs/blocktree/SegmentTermsEnumFrame.java b/lucene/core/src/java/org/apache/lucene/codecs/blocktree/SegmentTermsEnumFrame.java index c888b1339b7..c3bc8739adf 100644 --- a/lucene/core/src/java/org/apache/lucene/codecs/blocktree/SegmentTermsEnumFrame.java +++ b/lucene/core/src/java/org/apache/lucene/codecs/blocktree/SegmentTermsEnumFrame.java @@ -539,9 +539,10 @@ final class SegmentTermsEnumFrame { // keep scanning if (nextEnt == entCount) { - if (exactOnly) { - fillTerm(); - } + // nocommit? + //if (exactOnly) { + //fillTerm(); + //} // We are done scanning this block break nextTerm; } else { @@ -658,10 +659,11 @@ final class SegmentTermsEnumFrame { // keep scanning if (nextEnt == entCount) { - if (exactOnly) { - fillTerm(); - //termExists = true; - } + // nocommit? + //if (exactOnly) { + //fillTerm(); + //termExists = true; + //} // We are done scanning this block break nextTerm; } else {