setCommitOnClose

Sets if calls IndexWriter.close should first commit before closing. Use true * to match behavior of Lucene 4.x.