Sync elasticsearch on connection with database - nodeJS
问题 Aim : sync elasticsearch with postgres database Why : sometimes newtwork or cluster/server break so future updates should be recorded This article https://qafoo.com/blog/086_how_to_synchronize_a_database_with_elastic_search.html suggests that I should create a separate table updates that will sync elasticsearch's id , allowing to select new data (from database) since the last record (in elasticsearch). So I thought what if I could record elasticsearch's failure and successful connection: if