Node.js 使用单个消防软管将数据索引到多个索引
我试图理解是否有可能通过传递索引名称和类型(类似于elasticsaerch批量api),使用kinesis firehose将数据索引到多个索引中的elasticsearch AWS文档()说明: 。。。。此外,还可以使用rest.action.multi.allow_explicit_index选项为您的 Elasticsearch cluster必须设置为true(默认值)才能执行 具有每个记录设置的显式索引的批量请求。更多 有关详细信息,请参阅Amazon中的Amazon ES配置高级选项 Elasticsearch服务开发者指南 但我找不到任何关于如何操作的文档,而且firehose配置需要索引名 这一尝试不起作用:Node.js 使用单个消防软管将数据索引到多个索引,node.js,
elasticsearch,amazon-kinesis-firehose,Node.js,
elasticsearch,Amazon Kinesis Firehose,我试图理解是否有可能通过传递索引名称和类型(类似于elasticsaerch批量api),使用kinesis firehose将数据索引到多个索引中的elasticsearch AWS文档()说明: 。。。。此外,还可以使用rest.action.multi.allow_explicit_index选项为您的 Elasticsearch cluster必须设置为true(默认值)才能执行 具有每个记录设置的显式索引的批量请求。更多 有关详细信息,请参阅Amazon中的Amazon ES配置高级选
const data = [
{
"value": "1",
"_index": "index1",
"_type": "type1"
}];
const params = {
DeliveryStreamName: 'XXX', /* required */
Records: [/* required */
{
Data: JSON.stringify(data[0]) //new Buffer('...') || 'STRING_VALUE' /* Strings will be Base-64 encoded on your behalf */ /* required */
}
]
};
firehose.putRecordBatch(params, (err, data) => {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
我们将非常感谢您的帮助好久没有提出请求了,但是。。。根据Kinesis常见问题解答(): 单个交付流当前只能向一个Amazon Elasticsearch服务域和一个索引交付数据。如果您希望将数据传递到多个Amazon Elasticsearch域或索引,可以创建多个传递流