|
I just committed http://issues.apache.org/jira/secure/attachment/12340475/newMergePolicy.Sept08.patch
Thanks for the very thorough job on this patch! A small fix named KeepDocCount0Segment.Sept15.patch is attached to
In mergeSegments(...), if the doc count of a merged segment is 0, it is not added to the index (it should be properly cleaned up). Before TestIndexWriterMergePolicy is slightly modified to fix a bug and to check that segments are probably cleaned up. The patch passes all the tests. Should lowerBound start off as -1 in maybeMergeSegments if we keep 0 sized segments?
> Should lowerBound start off as -1 in maybeMergeSegments if we keep 0 sized segments?
Good catch! Although the rightmost disk segment cannot be a 0-sized segment right now, it could be when NewIndexModifier is in. Shoud I submit a new patch? No need to submit a new patch... I made the change and committed it.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
LUCENE-565to track this separately.