Overload List

  NameDescription
Public methodPrepareCommit()()()()
Expert: prepare for commit.

NOTE: if this method hits an OutOfMemoryError you should immediately close the writer. See above for details.

Public methodPrepareCommit(IDictionary<(Of <<'(String, String>)>>))

Expert: prepare for commit, specifying commitUserData Map (String -> String). This does the first phase of 2-phase commit. You can only call this when autoCommit is false. 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 {@link #Commit()} to finish the commit, or {@link #Rollback()} to revert the commit and undo all changes done since the writer was opened.

You can also just call {@link #Commit(Map)} directly without prepareCommit first in which case that method will internally call prepareCommit.

NOTE: if this method hits an OutOfMemoryError you should immediately close the writer. See above for details.

See Also