Mailing List Archive

problem with last patch (obtain write.lock while deleting documents)
Hi,

I've just updated to the latest version (to get the fix for the NullPointerException with some phrase queries) and now I'm having
problems with document deletion. I'm trying to delete a document using delete(Term) and I'm getting an IOException:

java.io.IOException: Index locked for write: Lock@E:\temp\index\write.lock
at org.apache.lucene.index.IndexReader.delete(Unknown Source)
at org.apache.lucene.index.SegmentsReader.doDelete(Unknown Source)
at org.apache.lucene.index.IndexReader.delete(Unknown Source)
at org.apache.lucene.index.IndexReader.delete(Unknown Source)
(...)

Here's what I'm doing:
IndexReader reader = IndexReader.open(index);
reader.delete(new Term("fileid", id));
reader.close();

I've taken a look at the sources but couldn't find anything wrong. Any ideas?
BTW, when performing this deletion there's no index writer opened; I assume the writer lock is being created by the IndexReader when
executing delete(numDoc).

TIA

Regards,

--Daniel


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