Hi, While updating my index I have the following error :
[3/1/07 9:44:19:214 CET] 76414c82 SystemErr R java.io.IOException: Lock obtain timed out: [EMAIL PROTECTED]:\TEMP\lucene-b56f455aea0a705baecaa4411d590aa2-write.lock [3/1/07 9:44:19:214 CET] 76414c82 SystemErr R at org.apache.lucene.store.Lock.obtain(Lock.java:56) [3/1/07 9:44:19:214 CET] 76414c82 SystemErr R at org.apache.lucene.index.IndexReader.aquireWriteLock(IndexReader.java:489 ) [3/1/07 9:44:19:214 CET] 76414c82 SystemErr R at org.apache.lucene.index.IndexReader.deleteDocument(IndexReader.java:514) [3/1/07 9:44:19:214 CET] 76414c82 SystemErr R at org.apache.lucene.index.IndexReader.deleteDocuments(IndexReader.java:541 ) I am using lucene 2.0, When I execute the code below I find an entry with the specified Term (it displays One Entry Found) Then when I try to delete the document, I get the error I apsted above. What I do is : open a second index reader, delete document close second index reader close main index reader, open new idnexreader Can anyone help ? Thank u very much. // Open second indexReader IndexReader mIndexReaderClone = null; try { mIndexReaderClone = IndexReader.open(mWorkingIndexDir); } catch (IOException exc) { exc.printStackTrace(); throw new RegainException("Creating index reader failed", exc); } Term urlTerm = new Term("url", url1); Query query2 = new TermQuery(urlTerm2); Document doc2; Hits hits2 = search(query2); if (hits2.length() > 0) { if (hits2.length() > 1) { System.out.println("Duplicates Entries"); } System.out.println("One Entry Found"); } else { System.out.println("No Entries"); } try { mIndexReaderClone.deleteDocuments(urlTerm); } catch (IOException e) { e.printStackTrace(); throw new RegainException("Deleting old entry failed", e); } // Close the Clone IndexReader try { mIndexReaderClone.close(); } catch (IOException exc) { throw new RegainException("Closing index reader failed", exc); } __________________________________ Matt ============================================ Internet communications are not secure and therefore Fortis Banque Luxembourg S.A. does not accept legal responsibility for the contents of this message. The information contained in this e-mail is confidential and may be legally privileged. It is intended solely for the addressee. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited and may be unlawful. Nothing in the message is capable or intended to create any legally binding obligations on either party and it is not intended to provide legal advice. ============================================
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]