Fixed update document bug while indexing