lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Boeckli, Dominique" <dominique.boec...@eds.com>
Subject document delete after reader.close()
Date Fri, 06 Jul 2007 14:16:23 GMT

Hello,

i have following problem:

I have written a Lucene JCA Connector which also taking care of the
index maintenance. From time to time the connector
is called (time initiated) and verifies if the index still is in synch
with the filesystem (deleted, added or updated documents).
If something changes, for example when a file was deleted, then the
documents are delete from the index as well:

IndexReader reader = getIndexReader();
	for (int i=0; i<documentsToDelete.size();i++) {
		String path = documentsToDelete.get(i).getPath();
		Term term = new Term(FileDocument.PATH, path);
		reader.deleteDocuments(term);
            count++;
	}
reader.close();

The problem is that the document is not deleted after the close. The
document is only deleted after a while
when the jca connector was recreated (deleted from the jca pool), which
means only after the thread has
terminated.

strange, did i missed something.

Please explain to me if i did something wrong

many thanks

Dominique

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