lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason Rutherglen <jason.rutherg...@gmail.com>
Subject Re: IndexWriter.rollback() logic
Date Tue, 24 Feb 2009 00:03:11 GMT
Howdy An,

Commit means the changes are committed, there's no rollback at that point.

Also in the futuer please post your questions to java-dev@lucene.apache.org

Take care,
Jason

On Mon, Feb 23, 2009 at 3:52 PM, An Hong <An.Hong@i365.com> wrote:

>  A question about IndexWriter.rollback() logic.  Its javadoc says that it
> "Close the IndexWriter without committing any of the changes that have
> occurred since it was opened."  So if I do
>
> 1.  Open  IndexWriter
>
> 2.  Add doc1
>
> 3.  Commit (successfully)
>
> 4.  Add doc2
>
> 5.  PrepareCommit()
>
> 6.  Rollback()
>
>
>
> Is doc1 in the index?  If not, I wonder how come rollback() does not roll
> back to the last successful commit() state instead?
>
> Thanks,
>
> An
>
>
>

Mime
View raw message