[ 
http://issues.apache.org/jira/browse/LUCENE-672?page=comments#action_12435174 ] 
            
Ning Li commented on LUCENE-672:
--------------------------------

A small fix named KeepDocCount0Segment.Sept15.patch is attached to LUCENE-565 
(can't attach here).

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 LUCENE-672, a 
merged segment was always added to the index. The use of mergeSegments(...) in, 
e.g. addIndexes(Directory[]), assumed that behaviour. For code simplicity, this 
fix restores the old behaviour that a merged segment is always added to the 
index. This does NOT break any of the good properties of the new merge policy.

TestIndexWriterMergePolicy is slightly modified to fix a bug and to check that 
segments are probably cleaned up. The patch passes all the tests.

> new merge policy
> ----------------
>
>                 Key: LUCENE-672
>                 URL: http://issues.apache.org/jira/browse/LUCENE-672
>             Project: Lucene - Java
>          Issue Type: New Feature
>          Components: Index
>    Affects Versions: 2.0.0
>            Reporter: Yonik Seeley
>         Assigned To: Yonik Seeley
>             Fix For: 2.1
>
>
> New merge policy developed in the course of 
> http://issues.apache.org/jira/browse/LUCENE-565
> http://issues.apache.org/jira/secure/attachment/12340475/newMergePolicy.Sept08.patch

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to