We have a MySQL database and are using Elastic 5.4 and wanted to know out of the below two options of getting data from MySQL into our ES index which is preferred and why (if possible)
As records are added, updated, and deleted in our MySQL transactional database, in turn use the REST API and index those documents in ES so they can be easily searched.
Setup logstash to upsert (not sure if delete works too?) into our ES index every 5 minutes as an example using a scheduled interval in a logstash config.
We are thinking of going wtih option 1 as it seems it will give us the most control and also allow use to add/update/delete documents at a more granular level than if we setup logstash, but we are not 100% certain. Option 1 seems like it would also allow us to only insert/update/delete records when it actually happens in our transacational database versus a scheduled process that just sort of runs in the background
Any advice or thoughts?
Thanks in advance!