Elasticsearch updateByQuery with wait_for_completion

I am using updateByQuery to update documents but I am getting version conflicts error . How I can handle this error.Can I use wait_for_completion option in elastic search to avoid version conflicts error? is any other solution to handle version conflicts error in updateByQyery?