Updating ElasticSearch Index from RDBMS Using Spring Data

I have the following setup:

  • Mysql RDBMS Server
  • Elastic search server

My requirement is to periodically copy data from the MYSQL DBMS and update the Elastic server with it. I am currently following the approach below:

  • A batch job that reads all data from MYSQL using Spring Data Jpa
  • Then it pushes all the data to the elastic server using Spring data

This approach is very cumbersome and inefficient. Is there a way where I can only read updated values โ€‹โ€‹using Spring data and update the index accordingly in an elastic state.

Using jdbc-river etc. Itโ€™s not an option for me, since the application uses Spring data to get data and search by elastic search, and the jdbc river will not be able to function normally, I think.

+4
source share

All Articles