gpt4 book ai didi

java - ElasticSearch 轮询不起作用

转载 作者:行者123 更新时间:2023-11-29 06:34:56 25 4
gpt4 key购买 nike

我正在按如下方式创建一条河流,当我创建记录时,记录会得到正确的索引。但它不是轮询,也就是说,如果我添加一条新记录,它不会反射(reflect)在索引中。

{
"type" : "jdbc",
"jdbc" : {
"driver" : "com.mysql.jdbc.Driver",
"url" : "jdbc:mysql://localhost:3306/test",
"user" : "[user]",
"password" : "[password]",
"sql" : "select PersonID as _id, LastName, FirstName, City from test.persons",
"strategy" : "simple",
"poll" : "6s",
"index" : "global",
"type" : "persons",
"bulk_size" : 100,
"autocommit": true
}
}

配置可能有什么问题?

最佳答案

用于 Elasticsearch 的 JDBC River 的最新版本中已弃用 poll 参数:

Obsolete parameters

In older versions of JDBC river, the following parameters were available. They are no longer supported.

driver - Class name of JDBC river. Since JDBC plugin requires JDBC Version 4 (or higher), which is part of Java 6, this parameter is not used any more.

poll - interval for waiting between river invocations. Replaced by schedule

bulk_size - renamed to maxbulkactions

max_bulk_requests - renamed to maxconcurrrentbulkactions

bulk_flush_interval - no longer supported, replaced by internal flush invocations

https://github.com/jprante/elasticsearch-river-jdbc

如果您使用的不是更新版本的 jdbc river,我会升级,然后查看上一页的详细文档。

关于java - ElasticSearch 轮询不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25504685/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com