Add update document function in text index