DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18177>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18177 IndexWriter ctor does not release lock on exception Summary: IndexWriter ctor does not release lock on exception Product: Lucene Version: 1.2 Platform: All OS/Version: All Status: NEW Severity: Normal Priority: Other Component: Index AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] If IndexWriter construction fails with an exception, the write.lock lock is not released. For example, this happens if one tries to open an IndexWriter on an FSDirectory which does not contain an Lucene index. FileNotFoundException will be thrown by org.apache.lucene.store.FSInputStream, after which the write lock will remain in the directory, and nobody can open the index. I have been using this pattern -- doing IndexWriter(..., false), catching FileNotFoundException and doing IndexWriter(..., true) -- in my code to initialize the index on demand, because the app never know if the index already exists. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
