lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "jacky" <jackych...@gmail.com>
Subject Re: lock file of lucene
Date Thu, 28 Sep 2006 01:54:24 GMT
hi,
   yes, but there maybe several programs to write the index. 
If a program is writing into the index, the index database maybe corrupted 
when another program unlocks it

     Best Regards.
       jacky  
       
----- Original Message ----- 
From: "Bhavin Pandya" <bhavinp@rediff.co.in>
To: <java-user@lucene.apache.org>
Sent: Wednesday, September 27, 2006 4:55 PM
Subject: Re: lock file of lucene


> Hi jacky,
> 
> Before you open IndexWriter object you can check whether lock file exists or 
> not and if its available you can unlock it.
> Use IndexReader.isLocked and IndexReader.unlock.
> 
> - Bhavin pandya
> 
> 
> ----- Original Message ----- 
> From: "jacky" <jackychenp@gmail.com>
> To: <java-user@lucene.apache.org>
> Sent: Wednesday, September 27, 2006 12:32 PM
> Subject: lock file of lucene
> 
> 
> > hi,
> >  When writing into an index, lucene will create a write lock file.
> > So, if there is an error during the writing. the lock file will not be 
> > deleted.
> > And also the JVM will not be closed for some time. So the program will 
> > have no chance to get lock of this index.
> > Is there any method to avoid that?
> >
> >     Best Regards.
> >       jacky
> > 
> 
> 
> ---------------------------------------------------------------------
> 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