[ 
https://issues.apache.org/jira/browse/LUCENE-5116?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Shai Erera updated LUCENE-5116:
-------------------------------

    Attachment: LUCENE-5116.patch

Patch adds tests for empty index and all deleted (fake) segment (thanks Rob!) 
and fixes IW.addIndexes.

Rob and I chatted about adding a check to CheckIndex, asserting there are no 
empty segments. But I'm not sure we should, because technically it's not an 
error. I.e. you could do new IW().commit() and it's a perfectly valid index.

This issue is more an optimization I guess than a bug -- don't do wasted work 
on segments that will be dropped.
                
> IW.addIndexes doesn't prune all deleted segments
> ------------------------------------------------
>
>                 Key: LUCENE-5116
>                 URL: https://issues.apache.org/jira/browse/LUCENE-5116
>             Project: Lucene - Core
>          Issue Type: Bug
>            Reporter: Robert Muir
>         Attachments: LUCENE-5116.patch, LUCENE-5116_test.patch
>
>
> at the least, this can easily create segments with maxDoc == 0.
> It seems buggy: elsewhere we prune these segments out, so its expected to 
> have a commit point with no segments rather than a segment with 0 documents...

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
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