lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Williams <p...@valinf.com>
Subject Error deleting a document when using the compound file index
Date Tue, 30 Dec 2003 17:07:01 GMT
Hi,

I am just testing Lucene 1.3 RC with the Compound index option on. When I
come to delete an existing document in the index to re-update a document, I
get an unable to obtain lock error.

java.io.IOException: Lock obtain timed out
	at org.apache.lucene.store.Lock.obtain(Lock.java:97)
	at org.apache.lucene.index.IndexReader.delete(IndexReader.java:279)
	at org.apache.lucene.index.IndexReader.delete(IndexReader.java:312)
	at objects.CH_Lucene.updateDocument(CH_Lucene.java:1065)
	at
servlets.CH_SearchConnection.updateDocument(CH_SearchConnection.java:1048)
	at
functions.CH_UpdateThread.updateDocument(CH_UpdateThread.java:255)
	at functions.CH_UpdateThread.run(CH_UpdateThread.java:132)

I am using the following snippet of code to remove the previous document
entry.

DecimalFormat df = new DecimalFormat("########");
df.setMinimumIntegerDigits(8);
		
Term docNumberTerm = new Term("Field10", df.format(ldoc));

IndexReader reader = IndexReader.open(location);
		
// Delete old term if present
if (reader.docFreq(docNumberTerm) > 0)
{
	reader.delete(docNumberTerm);
}
reader.close();

I did not get this when I was using the normal index file structure. Is
there a way round this?

Regards,

Paul


DISCLAIMER: The information in this message is confidential and may be
legally privileged. It is intended solely for the addressee.  Access to this
message by anyone else is unauthorised.  If you are not the intended
recipient, any disclosure, copying, or distribution of the message, or any
action or omission taken by you in reliance on it, is prohibited and may be
unlawful.  Please immediately contact the sender if you have received this
message in error. Thank you. Copyright Valid Information Systems Limited.
http://www.valinf.com Address Morline House, 160 London Road, Barking,
Essex, IG11 8BB. Tel: 020 8215 1414 Fax: 020 8215 2040. 



---------------------------------------------------------------------
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