lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Deepak Shakya <>
Subject Lucene updateDocument deletes the document, but the counts keep increasing
Date Wed, 17 Oct 2012 12:52:41 GMT
I am using updateDocument() method to update my document in the lucene
index. Here is how I am doing it.

writer.updateDocument(new Term(Constants.DOC_ID_FIELD,
doc.get(Constants.DOC_ID_FIELD)), doc);

I check my index data with Luke, and find that on second run of the
indexing, Luke tells that Deleted Document - not available. So basically,
the document is marked as deleted, but it still resides in the index.

I don't want to keep these marked deleted documents. Am I doing it wrong?

Also, my understanding was that, when I am updating the document, it
deletes the old one and then adds the new one. Is that not the case?

With Regards,
Deepak Shakya

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