updateDocument
Updates a document by first deleting the document(s) containing term and then adding the new document. The delete and then add are atomic as seen by a reader on the same index (flush may happen only after the add).
Return
The #sequence_number for this operation
Parameters
term
the term to identify the document(s) to be deleted
doc
the document to be added
Throws
if the index is corrupt
IOException
if there is a low-level IO error