make setMaxBufferedDocs(1) behave correctly

git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@372350 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Daniel Naber 2006-01-25 22:49:45 +00:00
parent 425efb182e
commit e37a04646a
2 changed files with 4 additions and 1 deletions

View File

@ -330,6 +330,9 @@ Bug fixes
fixed by aquiring the commit lock.
(Luc Vanlerberghe via Yonik Seeley, LUCENE-481)
22. IndexWriter.setMaxBufferedDocs(1) didn't have the expected effect,
this has now been fixed. (Daniel Naber)
Optimizations
1. Disk usage (peak requirements during indexing and optimization)

View File

@ -637,7 +637,7 @@ public class IndexWriter {
int mergeDocs = 0;
while (--minSegment >= 0) {
SegmentInfo si = segmentInfos.info(minSegment);
if (si.docCount >= targetMergeDocs)
if (si.docCount > targetMergeDocs)
break;
mergeDocs += si.docCount;
}