Hi
According to
http://www.gossamer-threads.com/lists/lucene/java-dev/37421
one cannot overwrite the default write lock timeout of 1000ms once a
write.lock already exists (for example inside a multi-threaded
web-application), because in order to use the method
setWriteLockTimeout(long) one would have to
first create an instance of IndexWriter, but because write.lock already
exists the creation will throw a LockObtainFailedException and hence
once does not get an instance.
In the link above "Mike" is mentioned that he will create a Jira issue,
but it's not clear to me if it ever got created
and/or that somebody tried to improve this. Any idea?
Just as a suggestions, but I think it would be nice if one could create
an IndexWriter instance without actually opening the index in the first
place, but rather something like:
IndexWriter iWriter = new IndexWriter();
iWriter.setDirectory(...);
iWriter.setAnalyzer(....);
iWriter.setWriteLockTimeout(75);
iWriter.open(); // or iWriter.checkout();
// do something with the index....
iWriter.close();
WDYT?
Thanks
Michael
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-user-h...@lucene.apache.org