Hi all,
I'm new to this list and hoping I'm asking this question in the correct
place. I upgraded lucene from a very, very old version to version
4.2.1. I'm finding that calling IndexWriter.commit() is much slower
than the previous IndexWriter.close() that I was calling with the old
lucene (that didn't have a commit call). It's taking 500ms-1s where
previously the close call was taking about 50ms. I call commit every
time I add a document. I am creating the IndexWriter as follows:
Directory dir = FSDirectory.open(index);
Analyzer analyzer = new MsStandardAnalyzer();
IndexWriterConfig iwc = new IndexWriterConfig(Version.LUCENE_42,
analyzer);
iwc.setOpenMode(OpenMode.CREATE_OR_APPEND);
iwc.setRAMBufferSizeMB(256.0);
IndexWriter writer = new IndexWriter(dir, iwc);
Is there something that I can do to make the commit call faster?