lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kevin Oliver" <>
Subject RE: IndexWriter.addIndexes(Directory[] dirs)
Date Mon, 12 Dec 2005 22:53:02 GMT
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 


-----Original Message-----
From: Volodymyr Bychkoviak [] 
Sent: Monday, December 12, 2005 5:51 AM
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 
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?)

Volodymyr Bychkoviak

View raw message