How do you set up IndexWriter (can you paste the code here)? setMergeFactor just controls how often merges will occur. But there are other settings, like setRAMBufferSizeMB and setMaxBufferedDocs that control how often to create a segment. If for example you set maxBufferedDocs to 1, or RAMBufferSizeMB to a small value, such that each document fills the entire buffer, you'll run into the scenario you mentioned.
If that's not the case, then it'd be good if you can paste here the indexing code including the IndexWriter setup, docs indexing etc. Shai On Sun, Jul 26, 2009 at 8:25 AM, Venkat Rangan < venkat.ran...@clearwellsystems.com> wrote: > Hi, > > > > We are writing to an index using IndexWriter with setMergeFactor() set > to 10. After inserting several documents, a merge occurs, but our > observation is that each segment only has a single document. Is there a > way to get more than a single document in each segment before they are > picked up for a merge? > > > > The following is the merge debug line when setInfoStream is set to > stdout stream. > > > > 2009-07-26 07:07:09,202 INFO [STDOUT] (main:) merging segments _ram_0 > (1 docs) _ram_1 (1 docs) _ram_2 (1 docs) _ram_3 (1 docs) _ram_4 (1 docs) > _ram_5 (1 docs) _ram_6 (1 docs) _ram_7 (1 docs) _ram_8 (1 docs) _ram_9 > (1 docs) into _0 (10 docs) > > > > Thanks, > > > > Venkat Rangan > > Clearwell Systems Inc. > > > >