lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Becker <pbec...@dstc.edu.au>
Subject Unlocking an index
Date Wed, 09 Jul 2003 05:55:51 GMT
Me again...

I am trying to create a command line option for our tool to force index 
access even if the index is locked. Of course I could remove the lock 
files manually but that doesn't seem to be a good idea since I'd have to 
make some assumptions about the internal workings of your code.

I tried this (indexLocation = path to index as String):

  IndexReader.unlock(FSDirectory.getDirectory(indexLocation, false));

Is that appropriate? Is there any way to avoid the IOException that gets 
thrown about not being able to delete "commit.lock"?

Thanks,
  Peter


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


Mime
View raw message