lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From S Eslamian <seslam...@gmail.com>
Subject Re: IndexWriter.isLock()
Date Mon, 07 May 2012 04:27:33 GMT
Yes, I'm sure. I debug the code, and look at the files in the index folder,
it has a write.lock file before this line of code:
if (!(IndexWriter.isLock(NIOFSDirectory.open("fileAddr")))){
  //do something
}

and after passing this line, index folder does not contain write.lock file
and code goes to the if loop while it shouldn't passes the if clause!

S Eslamian

On Sun, May 6, 2012 at 5:56 PM, Michael McCandless <
lucene@mikemccandless.com> wrote:

> Hmm, not good.  Are you sure the index was previously locked?
>
> Can you describe your environment?  Which OS / Directory class are you
> using?
>
> Maybe boil down to a small code fragment showing the issue?
>
> Mike McCandless
>
> http://blog.mikemccandless.com
>
> On Sun, May 6, 2012 at 8:29 AM, S Eslamian <seslamian@gmail.com> wrote:
> > Hi all
> > While I am using IndexWriter.isLock(), this method unlocks the index and
> > returns false.
> > Can anyone tell me why?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message