hi
i am updating the index and therefore need to delete documents before
adding the updated version.
This is how I delete the document which is working fine.
-
int deleteDoc = 0;
deleteDoc = IndexReader.open(dstDir).delete(new
Sorry guys I have solved it. I should do this.
int deleteDoc = 0;
IndexReader reader = IndexReader.open(dstDir);
deleteDoc = reader.delete(new Term(url, url));
reader.close();
Just need to use the same instance of reader.
anyway lucene should just overwrite the old document during updating