'Update data in elasticsearch from csv

I have a bunch of indices A,B,C,D containing large amounts of data per each let's say 50 million records per index and the record contains data as follows:

user: amine, age: 22, state: Michigan

and I want to create a new index E and bulk new data into it from a csv file. What I hope for is that if a user from E already exists in one of the other indices but with different information for example:

user: amine, age: 25, state: California 

I want the user amine to be updated in all other indices with the new data. I tried pulling all the data processing it and re-ingesting it but the process took so long.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source