Nadav Har'El wrote:
On Mon, Feb 23, 2009, Jason Rutherglen wrote about "Re:
IndexWriter.rollback() logic":
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
Actually, An does make a good point that need to be corrected (by
developers,
not by users ;-)) - the javadoc is a bit misleading. rollback's
javadoc says
Close the IndexWriter without committing any of the changes that have
occurred since it was opened. This removes any temporary files that
had
been created, after which the state of the index will be the same
as it
was when this writer was first opened.
But, this isn't exactly true - it doesn't always revert to the state
of the
open(), but rather to the last commit() if such was done. For most
intents
and purposes (including this one), commit() is equivalent to a close()
followed by a new open(), but a person reading this javadoc wouldn't
know that.
Thanks Nadav; I'll fix the javadocs.
Mike
---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-dev-h...@lucene.apache.org