[
https://issues.apache.org/jira/browse/LUCENE-5116?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13713556#comment-13713556
]
Shai Erera commented on LUCENE-5116:
------------------------------------
I fixed IW.addIndexes to drop empty segments and Rob's test passes. However I
fail to reproduce the case where you add a segment with all documents deleted.
No matter what I do -- call IW.deleteDocuments(new MADQ()) or
IW.deleteDocuments(new TermQuery()) -- basically a query that matches all the
documents in a segment, the segment is dropped on the next commit. Is it even
possible to add a segment with all documents deleted?
The fix is general (compares segment.numDocs > 0), so it will capture those
cases too ... only I currently fail to reproduce one. Any ideas how I can repro
it?
> 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_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]