Question about the behavior of 
FileWriter.addIndexes()

What I observed (and I know I should just go look at the source but) was that if I 
used this method to add several indexes into a new blank index, optimize was not 
called when it was done.  If I added several indexes into an existing index, then when 
it finished merging them, it called optimize.

Is this what occurs?

Assuming yes, then the best performance would be to make indexes in a ram directory, 
write them to a blank index on disk, and then when your all done, merge all of the 
disk directories in one swoop to avoid optimizing multiple times?  I'll have to give 
it a try.  

Thanks for the tip.

Dan



-----Original Message-----
From: Scott Ganyo [mailto:[EMAIL PROTECTED]] 
Sent: Friday, December 20, 2002 12:58 PM
To: Lucene Users List
Subject: Re: Lucene Benchmarks and Information


FYI: The best thing I've found for both increasing speed and reducing 
file handles is to use an IndexWriter on a RamDirectory for indexing and 
then use FileWriter.addIndexes() to write the result to disk.  This is 
subject to the amount of memory you have available, of course...

Scott



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to