0

我正在将弹性搜索 2.1 升级到 5.0。我使用了 2.1 的文档摄取插件,它在批量摄取时效果最佳。

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

我创建了一个管道:

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

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

4

1 回答 1

0

你是对的@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);
  });
});
于 2016-12-01T13:58:38.300 回答