Hi, I read document/code and did some experiments, one possibility is to raise mergeFactor to high value, say close to 2Billion, then a lot of small files are created and after >500 docs are created separately, search speed dropped sharply.
I noticed with our current data, if I add one doc then call optimize(), it took about 7s, this is too slow for real time search. If I keep mergeFactor as 10 and donot call optimize(), does it mean from time to time IndexWriter would optimize on background, when it happens, it may take a few seconds (so Index will delay a few seconds)? Should I use high mergeFactor and optimize once a day, or use default mergeFactor and donot call optimize? maybe latter is better, but I am concerned about occasional slowness? Currently I donot plan to keep IndexWriter constantly open, but open/close for each index request. Any suggestion to improve would be appreciated, Lisheng -----Original Message----- From: Zhang, Lisheng [mailto:lisheng.zh...@broadvision.com] Sent: Thursday, September 23, 2010 6:11 PM To: java-user@lucene.apache.org Subject: In lucene 2.3.2, needs to stop optimization? Hi, We are using lucene 2.3.2, now we need to index each document as fast as possible, so user can almost immediately search it. So I am considering stop IndexWriter optimization during real time, then in relatively off-time like late night we may call IndexWriter optimize method explicitly once. What is the most efficient way to completely turn off IndexWriter merge in lucene 2.3.2? Thanks very much for helps, Lisheng --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org For additional commands, e-mail: java-user-h...@lucene.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org For additional commands, e-mail: java-user-h...@lucene.apache.org