En, thanke you. I also found the question that I should make the writer a singleton. and the writer commited and closed every batch. That is,In every buildIndexWriterConfig iwc = new IndexWriterConfig(Version.LUCENE_40, analyzer);iwc.setOpenMode(IndexWriterConfig.OpenMode.CREATE_OR_APPEND);iwc.setRAMBufferSizeMB(ram);int maxDocs = itmParamParser.maxBufferedDocs;iwc.setMaxBufferedDocs(100000);logger.info("build | RAMBufferSizeMB="+ram+" MB, MaxBufferedDocs="+maxDocs);writer = new IndexWriter(directory, iwc);.........writer.addDocument(document, analyzer);......writer.commit(userData);writer.close();
----- -------------------------- Email: wuqiu.m...@qq.com -------------------------- -- View this message in context: http://lucene.472066.n3.nabble.com/why-did-I-build-index-slower-and-slower-tp4062798p4062849.html Sent from the Lucene - Java Users mailing list archive at Nabble.com.