Real-time synchronization between ElasticSearch and mysql databases

Source: Internet
Author: User
I know a tool named ElasticSearch-jdbc. I also read the official documentation and wrote a test according to the official documentation (for the command, see the bottom), but it cannot be synchronized in real time, it will be updated in about one minute. I don't know where the problem is. Please let us know before you go! Command: {& quot; type & quot;: & quot; jdbc & quot;, & quot; jdbc & quot ;:{ & quot; url & quot ;:& quot; jdbc: mysql: xxx. xxx. xxx. xxx: 3306 world & quot;, & quot; user & synchronize mysqlelastic search

I know a tool named ElasticSearch-jdbc. I also read the official documentation and wrote a test according to the official documentation (for the command, see the bottom), but it cannot be synchronized in real time, it will be updated in about one minute. I don't know where the problem is. Please let us know before you go!
Command:
{
"Type": "jdbc ",
"Jdbc ":{
"Url": "jdbc: mysql: // xxx. xxx: 3306/world ",
"User": "root ",
"Password": "xxxxxx ",
"Schedule": "*/5 ****? ",
"Locale": "en_US ",
"SQL ":[
{
"Statement": "select \" world \ "as _ index, \" city \ "as _ type, ID as _ id, Name as \" Name \", countryCode as \ "CountryCode \", District as \ "District \", Population as \ "Population \" from city where \ "mytimestamp \">? ",
"Parameter": ["$ metrics. lastexecutionstart"]
},
{
"Statement": "delete from city where \" _ job \ "=? ",
"Parameter": ["$ job"]
}
],
"Statefile": "statefile. json ",
"Elasticsearch ":{
"Cluster": "my_cluster_name1 ",
"Host": "localhost ",
Port: 9300
},
"Index": "world ",
"Type": "city ",
"Index_settings ":{
"Index ":{
"Number_of_shards": 1
}
}
}
}

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.