lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adrien Grand <jpou...@gmail.com>
Subject Re: merging policy is not triggered behind the scene
Date Sat, 15 Jun 2013 09:09:37 GMT
Hi Lei,

On Fri, Jun 14, 2013 at 1:06 AM, Reg <register9527@gmail.com> 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: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message