How to keep mysql data and Elasticsearch data synchronized in real time?

WBOY
Release: 2016-07-06 13:53:57
Original
1526 people have browsed it

I am working on a project recently, and I need to use Elasticsearch to do a product search. What should I do to keep mysql data and Elasticsearch data synchronized in real time? All I can think of now is to update every time it involves database operations. Elasticsearch, but in this case, there will be too many modifications to the original program, because the original program only uses mysql. Please provide a better solution, thank you! ! !

Reply content:

I am working on a project recently, and I need to use Elasticsearch to do a product search. What should I do to keep mysql data and Elasticsearch data synchronized in real time? All I can think of now is to update every time it involves database operations. Elasticsearch, but in this case, there will be too many modifications to the original program, because the original program only uses mysql. Please provide a better solution, thank you! ! !

How big are the daily changes?
If frequently changing data such as inventory and sales volume are isolated, or updated periodically, the frequency is controlled.
I handle it through triggers.
http://www.toozy.cn/mysql-trigger-elasticsearch/

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!