【问题标题】:Snapshot in Elasticsearch of a specific index failing on Node.jsElasticsearch 中特定索引在 Node.js 上失败的快照
【发布时间】: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


【解决方案1】:

简单的错误 - 真丢人。 indices 参数必须是 body 的一部分,而我的请求中根本没有。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-05-21
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-09-28
    • 2016-06-17
    相关资源
    最近更新 更多