【问题标题】:Elasticsearch 5.0 batch document ingestion with pipeline使用管道的 Elasticsearch 5.0 批量文档摄取
【发布时间】:2016-12-01 13:50:59
【问题描述】:

我正在将 elasticsearch 2.1 升级到 5.0。我在 2.1 中使用了一个文档摄取插件,它在批量摄取时效果最佳。

对于 5.0,我在 5.0 中安装了摄取附件。

我已经创建了一个管道:

{
  "attachment": {
  "description": "Attachment ingestion",
  "processors": [
    {
      "attachment": {
        "field": "data"
      }
    }]
  }
}

问题是,对于之前的插件,我使用批量摄取,但我在文档中找不到如何在使用管道的同时进行批量摄取?

【问题讨论】:

  • 您使用批量执行完全相同的方式,唯一的变化是您需要在批量调用中指定管道名称。

标签: elasticsearch elasticsearch-plugin elasticsearch-5


【解决方案1】:

你是对的@val,这是一个 rtm 的案例!

return new Promise((resolve, reject) => {
  client.bulk({
    body: documentArray,
    pipeline: 'attachment',//this worked
  }, (error, response) => {
    if (error) {
      return reject(error.message);
    }

    resolve(response);
  });
});

【讨论】:

  • 很高兴你知道了!
猜你喜欢
  • 2018-10-07
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多