Fetching changes from table with ElasticSearch JDBC river(使用 ElasticSearch JDBC River 从表中获取更改)
问题描述
我正在为 ElasticSearch 配置 JDBC River,但我找不到任何好的配置示例.我已阅读 pages 上的所有 elasticsearch-river-jdbc GitHub.
I'm configuring JDBC river for ElasticSearch but I can't find any good config example. I've read all pages on elasticsearch-river-jdbc GitHub.
我有一个 SQL 查询,我需要每隔 X 秒从所有表列中获取更改.如何告诉 JDBC River 某行已更改并应重新编制索引?
I have a SQL query and I need to fetch changes from all table columns every X seconds. How can I tell JDBC river that some row is changed and should be reindexed?
在 ES 服务器启动期间获取数据,正在进行轮询,但不会将更改从 DB 获取到 ES.
Data are fetched during ES server start, polling is happening, but changes are not fetched from DB to ES.
我的配置:
curl -XPUT 'localhost:9200/_river/itemsi/_meta' -d '{
"type" : "jdbc",
"jdbc" : {
"driver" : "com.mysql.jdbc.Driver",
"url" : "jdbc:mysql://mydb.com:3306/dbname",
"user" : "yyy",
"password" : "xxx",
"sql" : "SELECT ii.id AS _id, ii.id AS myid, ... FROM ... LEFT JOIN .. ON...",
"poll" : "6s",
"strategy" : "simple"
},
"index" : {
"index" : "invoiceitems",
"bulk_size" : 600,
"max_bulk_requests" : 10,
"bulk_timeout" : "5s",
}
}'
谢谢.
推荐答案
添加
自动提交":真
在索引设置中.那么问题就解决了
in index settings. Then the problem will be resolved
这篇关于使用 ElasticSearch JDBC River 从表中获取更改的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:使用 ElasticSearch JDBC River 从表中获取更改


基础教程推荐
- 无法在 ubuntu 中启动 mysql 服务器 2021-01-01
- SQL Server 2016更改对象所有者 2022-01-01
- SQL Server 中单行 MERGE/upsert 的语法 2021-01-01
- SQL Server:只有 GROUP BY 中的最后一个条目 2021-01-01
- ERROR 2006 (HY000): MySQL 服务器已经消失 2021-01-01
- 使用pyodbc“不安全"的Python多处理和数据库访问? 2022-01-01
- 在 VB.NET 中更新 SQL Server DateTime 列 2021-01-01
- Sql Server 字符串到日期的转换 2021-01-01
- 将数据从 MS SQL 迁移到 PostgreSQL? 2022-01-01
- 如何在 SQL Server 的嵌套过程中处理事务? 2021-01-01