ELK,萌萌哒

river jdbc 更新问题

Elasticsearch | 作者 xi4oh4o | 发布于2015年02月02日 | 阅读数:4658

使用 river-jdbc 建立了一个 MySQL river,然后向_source 里加了新的 field,但每次 river 更新后,这个新加的 field 就会被删除,请问是否可以保留这个额外加进去的field?
已邀请:

xi4oh4o - PI

赞同来自: Rubricate

{{{
PUT /_river/my_jdbc_river/_meta
{
"type" : "jdbc",
"strategy" : "simple",
"interval" : "6000",
"schedule" : "0 0-59 0-23 ? * *",
"flush_interval" : "5s",
"jdbc" : [ {
"url" : "jdbc:mysql://localhost:3306/test",
"user" : "root",
"password" : "",
"sql" : "select *, id as _id from test",
"index" : "dbs",
"type" : "table",
"versioning" : true,
"digesting" : false,
"autocommit" : true
}, {
"url" : "jdbc:mysql://localhost:3306/test",
"user" : "root",
"password" : "",
"sql" : "select *, id as _id from test",
"index" : "dbs",
"type" : "table",
"versioning" : true,
"digesting" : false,
"autocommit" : true
} ]
}
}}}

我这样建立一个 river,之后我再向里面加入自定义的 field,然后这个 river 自动更新以后,会把我加的自定义 field 删掉,看起来river 的更新机制就是先 delete,create,导致自定义的字段就没了

Rubricate - hi

赞同来自:

贴贴 代码呢

要回复问题请先登录注册