【发布时间】:2016-01-05 14:27:58
【问题描述】:
我尝试使用官方 node.js 模块中的 indices 参数创建单个索引的快照,但我总是最终获得集群的完整快照。
@es.snapshot.create(
{ snapshot: "#{uid}", indices: index, repository: @config.esrepo, include_global_state: false }
( err, created ) ->
...
...
)
上面的coffeescript转换成这样的:
_this.es.snapshot.create({
snapshot: uid,
indices: index,
repository: _this.config.esrepo,
include_global_state: false
}, function(err, created) {
.....
});
这是由于 es 客户端中的错误或缺少功能造成的吗?在 API 中描述了 indices 参数,但在 JS 客户端 API 中没有描述...?
【问题讨论】:
-
index和@config.esrepo中有哪些值? -
您遇到什么错误? ES 日志是怎么说的?
-
@config.esrepo 是 Snapshotrepository 的名称,在这种情况下,它是一个基于 AWS S3 的存储库。 ES 不会抛出错误,但它总是对所有索引进行快照,尽管明确定义了一个要使用的索引。
标签: javascript elasticsearch coffeescript elasticsearch-plugin