Method PrepareCommit
PrepareCommit()
Expert: prepare for commit. This does the first phase of 2-phase commit. this method does all steps necessary to commit changes since this writer was opened: flushes pending added and deleted docs, syncs the index files, writes most of next segments_N file. After calling this you must call either Commit() to finish the commit, or Rollback() to revert the commit and undo all changes done since the writer was opened.
You can also just call Commit() directly without PrepareCommit() first in which case that method will internally call PrepareCommit().
NOTE: if this method hits an
Declaration
public void PrepareCommit()