lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Zhang, Lisheng" <>
Subject RE: In lucene 2.3.2, needs to stop optimization?
Date Fri, 24 Sep 2010 06:47:28 GMT

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

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,


-----Original Message-----
From: Zhang, Lisheng []
Sent: Thursday, September 23, 2010 6:11 PM
Subject: In lucene 2.3.2, needs to stop optimization?


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:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message