[英]Elasticsearch 5.0 batch document ingestion with pipeline
I'm upgrading elasticsearch 2.1 to 5.0. 我将Elasticsearch 2.1升级到5.0。 I used a document ingestion plugin for 2.1 which works most excellently with a batch ingest.
我使用了2.1版本的文档提取插件,该插件最适合批量提取。
For 5.0 I've installed the ingest-attachment in 5.0. 对于5.0,我已经在5.0中安装了摄取附件。
I've created a pipeline: 我创建了一个管道:
{
"attachment": {
"description": "Attachment ingestion",
"processors": [
{
"attachment": {
"field": "data"
}
}]
}
}
The problem is, with the previous plugin I was ingesting using bulk, but I can't find in the documentation how to do a bulk ingest whilst utilising a pipeline? 问题是,我以前使用的是使用批量导入的插件,但是在文档中找不到如何在利用管道的同时进行批量导入?
You're right @val, it was a case of rtm! 您说对了@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);
});
});
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.