Apache Lucene.Net 2.4.0 Class Library API

IndexWriter.Rollback Method 

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. This can only be called when this IndexWriter was opened with
autoCommit=false
. This also clears a previous call to PrepareCommit().

public virtual void Rollback();

See Also

IndexWriter Class | Lucene.Net.Index Namespace