lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael McCandless (Commented) (JIRA)" <>
Subject [jira] [Commented] (LUCENE-3564) rename IndexWriter.rollback to .rollbackAndClose
Date Tue, 08 Nov 2011 23:55:51 GMT


Michael McCandless commented on LUCENE-3564:

bq. I fully agree with the change in semantics of the API, but why did we have to add the
'IfNeeded' part?

Actually it's 'ifChanged' not 'ifNeeded'.

bq. What's wrong with just reopen() (as static)?

Because reopen implies it's reopening the reader in-place, when it's
not (this tripped up some users).  It's opening a new reader, sharing
what it can with the old one.

bq. BTW, when I call an .open() API, I expect it to do it, and not 'IfNeeded', so I don't
like it. We still have time to fix it before we release 3.5.

Right, and that's why we didn't name it just '.open'... the
'ifChanged' is conveying that no opening will take place if there has
been no change to the index.

> rename IndexWriter.rollback to .rollbackAndClose
> ------------------------------------------------
>                 Key: LUCENE-3564
>                 URL:
>             Project: Lucene - Java
>          Issue Type: Improvement
>            Reporter: Michael McCandless
>            Assignee: Michael McCandless
>             Fix For: 3.5, 4.0
> Spinoff from LUCENE-3454, where Shai noticed that rollback is trappy since it [unexpected]
closes the IW.
> I think we should rename it to rollbackAndClose.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message