我尝试使用官方node.js模块中的indices参数创建单个索引的快照,但我总是得到一个完整的群集快照。
@es.snapshot.create(
{ snapshot: "#{uid}", indices: index, repository: @config.esrepo, include_global_state: false }
( err, created ) ->
...
...
)
上面的咖啡因翻译成这样的东西:
_this.es.snapshot.create({
snapshot: uid,
indices: index,
repository: _this.config.esrepo,
include_global_state: false
}, function(err, created) {
.....
});
这是由于es客户端中的错误或缺少功能吗? indices参数在API中描述,但在JS客户端API中没有...?
答案 0 :(得分:0)
简单错误 - 对我感到羞耻。 indices
参数必须是body
的一部分,我的请求中缺少该参数。