Update entire documents

hello,

i have an elastic instance with more than 100 million document, i have a date field with different format on each document, so i want to update all the documents to have a unified date format

i am using something like this to iterate over all the data

scan_results = scan(es, query=query, index=index_name)

but after sometime it raises a not found error related to the scrolling timeout, so is there is any better way to do this task, or a solution for the timeout issue