lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Otis Gospodnetic <otis_gospodne...@yahoo.com>
Subject Re: Unlocking an index
Date Wed, 09 Jul 2003 19:39:44 GMT
Moved to lucene-user.

I'm not looking at the source, but my guess is that IOE is thrown in
cases where commit.lock does not exist....?
Anyhow, you may want to call isLocked method before calling unlock
method, in order to attempt forceful unlocking only when the index is
indeed locked.  This is risky business, of course, but it looks like
you are aware of it :)

Otis


--- Peter Becker <pbecker@dstc.edu.au> wrote:
> 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
> 


__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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


Mime
View raw message