lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Omar Didi" <>
Subject RE: index merging
Date Thu, 02 Feb 2006 21:10:27 GMT
Thanks Yonik,
I can't set the merge factor too high because I will end up with the too many files open problem.

I have got this method from

  public static boolean isLocked(Directory directory) throws IOException {
            directory.makeLock(IndexWriter.WRITE_LOCK_NAME).isLocked() ||

if I change this method to only check for directory.makeLock(IndexWriter.COMMIT_LOCK_NAME).isLocked();
will this tell me that a index is merging?

-----Original Message-----
From: Yonik Seeley []
Sent: Thursday, February 02, 2006 3:53 PM
Subject: Re: index merging

No, there isn't anything in the API to tell you that.
A merge may be triggered on any IndexWriter.add() call.

If you want to avoid merges, you can set the merge factor really high
so that merges will never happen, and set maxBufferedDocs to the size
of the segments you want.


On 2/2/06, Omar Didi <> wrote:
> Hi all,
>  I am trying to index in 2 different indexes with different mergefactors. so if one of
the indexes is merging than I want to index only on the other index.
> is there a way to know if an index is merging?.
> thanks

To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message