lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wgggfiy <wuqiu.m...@qq.com>
Subject Re: why did I build index slower and slower ?
Date Mon, 13 May 2013 07:36:48 GMT
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.main@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.
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message