lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "MATL (Mats Lindberg)" <>
Subject index, reindexing problem
Date Sun, 17 Oct 2004 12:35:59 GMT
I have a problem when reindexing some documents after an index has been
created, i get an error, the error is the following.
caught a class

with message: Lock obtain timed out:

This is how i do it. make the index (_indexDir is the location of the index)
writer = new IndexWriter(_indexDir, new StandardAnalyzer(), true);

..... do the indexing here



this works fine

2. this is where i get the error (reindex an existing document)
writer = new IndexWriter(_indexDir, new StandardAnalyzer(), false);
Directory directory;

IndexReader reader;

// if the file is in the index already, remove it

directory = FSDirectory.getDirectory(_indexDir, false);

reader =;

try {

Term term = new Term("deleteid", deleteID.toLowerCase()); 

if (reader.docFreq(term) >= 1) {

deletedItems = reader.delete(term);// ----- this is where the error
occurs, i get the locking error


} catch (Exception e) {

System.out.println(" caught a " + e.getClass() + "\n with message: " +

finally {




continue with reindexing the new document



I hope anyone can help me with this problem.


Best regards,

Mats Lindberg


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message