You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by mitu2009 <mu...@gmail.com> on 2009/06/24 00:13:29 UTC

How to know when Lucene Index generation process is completed

Hi,

I've a batch job which generates Lucene search indexes every night. I first
get all the records from the database and add it to Lucene index using
IndexWriter's AddDocument method and then call Optimize method before
returning from the method. Since the records fetched are faily large,
indexing takes around 2-3 minutes to complete. As you already know,Lucene
generates intermediate segment files while it is generating the index and it
compresses the whole index into 3 files when Optimize is called.

Is there anyway I can know that this index generation process is finished by
Lucene and index is avaialable for search? I need to know this because I
want to call another method when process is completed.

-- 
View this message in context: http://www.nabble.com/How-to-know-when-Lucene-Index-generation-process-is-completed-tp24175423p24175423.html
Sent from the Lucene - Java Developer mailing list archive at Nabble.com.


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


Re: How to know when Lucene Index generation process is completed

Posted by Michael McCandless <lu...@mikemccandless.com>.
Could you re-ask this on java-user?  This list discusses changes to
Lucene's source code. Thanks!

Mike

On Tue, Jun 23, 2009 at 6:13 PM, mitu2009<mu...@gmail.com> wrote:
>
> Hi,
>
> I've a batch job which generates Lucene search indexes every night. I first
> get all the records from the database and add it to Lucene index using
> IndexWriter's AddDocument method and then call Optimize method before
> returning from the method. Since the records fetched are faily large,
> indexing takes around 2-3 minutes to complete. As you already know,Lucene
> generates intermediate segment files while it is generating the index and it
> compresses the whole index into 3 files when Optimize is called.
>
> Is there anyway I can know that this index generation process is finished by
> Lucene and index is avaialable for search? I need to know this because I
> want to call another method when process is completed.
>
> --
> View this message in context: http://www.nabble.com/How-to-know-when-Lucene-Index-generation-process-is-completed-tp24175423p24175423.html
> Sent from the Lucene - Java Developer mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-dev-help@lucene.apache.org
>
>

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