在Node.js上失败的特定索引的Elasticsearch中的快照

时间:2016-01-05 14:27:59

标签: javascript elasticsearch coffeescript elasticsearch-plugin

我尝试使用官方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中没有...?

1 个答案:

答案 0 :(得分:0)

简单错误 - 对我感到羞耻。 indices参数必须是body的一部分,我的请求中缺少该参数。