Volodymyr, I tried this patch out, and unfortunately it doesn't appear
to work for me. Is there something I missed?

I'll try attaching my Junit test case that works when the code is
unpatched, but fails on the final assertion expecting 2 hits (on line
63) when I used the patched IndexWriter.java. 

Thanks, 
Kevin


-----Original Message-----
From: Volodymyr Bychkoviak [mailto:[EMAIL PROTECTED] 
Sent: Monday, December 12, 2005 5:51 AM
To: java-dev@lucene.apache.org
Subject: IndexWriter.addIndexes(Directory[] dirs)

IndexWriter in addIndexes(Directory[] dirs) method optimizes index 
before and after operation.

Some notes about this:
1). Adding sub indexes to large index can take long because of double 
optimization.
2). This breaks IndexWriter.maxMergeDocs logic, because optimize will 
merge data into single segment index.

I suggest add new method with boolean parameter to optionally specify 
whether index should be optimized.

There is similar method addIndexes(IndexReader[] readers) in IndexWriter

that takes array of IndexReaders but I don't know how it can be modified

to provide same optional functionality

Patch attached here to discuss it first
(should I post it directly to jira?)


-- 
regards,
Volodymyr Bychkoviak




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

Reply via email to