You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Konstantyn Smirnov <in...@yahoo.com> on 2012/08/01 13:03:59 UTC

Re: is there a way to control when merges happen?

Hi Mike.

I have a LogDocMergePolicy + ConcurrentMergeScheduler in my setup.
I tried adding new segments with 800-5000 documents in each of them in a
row, but the scheduler seemed to ignore them at first... only after some
time it managed to merge some of them.

I have an option to use a quartz-scheduler to trigger my mergers, but I
would like to keep that logic where it really belongs: in Lucene's
mergeScheduler.

Is there a way to control merge scheduling now (with 3.6.0)?
When exactly the scheduler is triggered: upon adding a new segment, or is it
running every n hours? Can I configure the scheduler to do both?

TIA






--
View this message in context: http://lucene.472066.n3.nabble.com/is-there-a-way-to-control-when-merges-happen-tp560736p3998571.html
Sent from the Lucene - Java Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Re: is there a way to control when merges happen?

Posted by Michael McCandless <lu...@mikemccandless.com>.
Whenever a new segment is flushed, or a merge completes, then the
MergePolicy and MergeScheduler are invoked.

You can also invoke them at any time by calling
IndexWriter.maybeMerge() yourself.

Mike McCandless

http://blog.mikemccandless.com


On Wed, Aug 1, 2012 at 7:03 AM, Konstantyn Smirnov <in...@yahoo.com> wrote:
> Hi Mike.
>
> I have a LogDocMergePolicy + ConcurrentMergeScheduler in my setup.
> I tried adding new segments with 800-5000 documents in each of them in a
> row, but the scheduler seemed to ignore them at first... only after some
> time it managed to merge some of them.
>
> I have an option to use a quartz-scheduler to trigger my mergers, but I
> would like to keep that logic where it really belongs: in Lucene's
> mergeScheduler.
>
> Is there a way to control merge scheduling now (with 3.6.0)?
> When exactly the scheduler is triggered: upon adding a new segment, or is it
> running every n hours? Can I configure the scheduler to do both?
>
> TIA
>
>
>
>
>
>
> --
> View this message in context: http://lucene.472066.n3.nabble.com/is-there-a-way-to-control-when-merges-happen-tp560736p3998571.html
> Sent from the Lucene - Java Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org