自动将ElasticSearch与SQL同步 [英] Automatically syncing ElasticSearch with SQL
本文介绍了自动将ElasticSearch与SQL同步的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我运行了这个查询,效果很好。
I've ran this query and it worked well.
curl -XPUT 'localhost:9200/_river/my_jdbc_river/_meta' -d '{
"type" : "jdbc",
"jdbc" : {
"url" : "jdbc:mysql://localhost:3306/test",
"user" : "myaccount",
"password" : "myaccount",
"sql" : "select * from orders"
}
}'
似乎所有东西都被编入索引。但是,当我从Orders表中更改数据时,更改并未反映ElasticSearch中的文档。是否可以自动同步更新/更改的数据?
Everything seems to be indexed. However, when I changed a data from the Orders Table, the changes did not reflect the document in ElasticSearch. Is it possible to automatically sync updated/changed data?
推荐答案
您需要为 schedule
添加另一个参数来告诉jdbc-河流定期提取数据。
You need to add another parameter for schedule
to tell jdbc-river to pull data periodically.
这里是对此的引用。
这篇关于自动将ElasticSearch与SQL同步的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文