To Delete lucene document you can do something like this:
Term keyTerm = new Term(String fld, String text);
try{
indexWriter.deleteDocuments(keyTerm);
}catch(IOException exp){
//handle exception
}
And for updating documents, there is a build in method :
updateDocument(Term term, Iterable<? extends IndexableField> doc)
Updates a document by first deleting the document(s) containing term and then adding the new document.
So from the documentation, first it deleting the document and the add it again, so simply you can do first delete the document using the above approach and then add it again.
for example:
// 1) delete the document
indexWriter.deleteDocuments(keyTerm);
// 2) add it again.
indexWriter.addDocument(luceneDoc);
Check IndexWriter
for more details.