lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "fp235-5" <julien.nio...@lingway.com>
Subject [PATCH] IndexWriter : controling the number of Docs merged
Date Sat, 20 Sep 2003 14:06:06 GMT
Hello, 

Someone made a suggestion yesterday about adding a variable to IndexWriter in
order to control the number of Documents merged in RAMDirectory independently of
the mergeFactor. (I'm sorry I don't remember who exactly and the mail arrived at
my office).
I'm proposing a tiny modification of IndexWriter to add this functionality. A
variable minMergeDocs specifies the number of Documents to be merged in memory
before starting a new Segment. The mergeFactor still control the number of
Segments created in the Directory and thus it's possible to avoid the file
number limitation problem.

The diff file is attached.

As noticed by Dmitry and Erik there are no true JUnit tests. I'd be OK to write
a JUnit test for this feature. The problem is that the SegmentInfos field is
private in IndexWriter and can't be used to check the number and size of the
Segments. I ran a test using the infoStream variable of IndexWriter - everything
seems to be OK.

Any comments / suggestions are welcome. 

Regards

Julien




Mime
View raw message