implemented bulk update using doc_as_upsert