Hi Lei, On Fri, Jun 14, 2013 at 1:06 AM, Reg <[email protected]> wrote: > I noticed if I do the merging in the following way, > IndexWriter.mabyeMerge() is never triggered automatically by the merge > scheduler. > > > IndexWriter writer = ...; > > IndexReader[] readers = ...; > > writer.addIndexes(readers) > > writer.close(); > > > Is it a bug or by design?
It is by design. For example, if you are adding several batches of IndexReaders into your index, your MergePolicy will be able to make a much better decision of which segments to merge after all batches have been added (by calling maybeMerge explicitely). -- Adrien --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
