Method Rollback
Rollback()
Close the IndexWriter without committing any changes that have occurred since the last commit (or since it was opened, if commit hasn't been called). this removes any temporary files that had been created, after which the state of the index will be the same as it was when Commit() was last called or when this writer was first opened. This also clears a previous call to PrepareCommit().
Declaration
public virtual void Rollback()