[英]index data to multiple indices using single firehose
I'm trying to understand if it's possible to index data to elasticsearch using kinesis firehose to multiple indices, by passing it the index name and type (similar to elasticsaerch bulk api)我试图了解是否可以使用 kinesis firehose 将数据索引到 elasticsearch 到多个索引,方法是将索引名称和类型传递给它(类似于 elasticsaerch 批量 api)
AWS documentation ( here ) says: AWS 文档( 此处)说:
.... Also, the rest.action.multi.allow_explicit_index option for your Elasticsearch cluster must be set to true (default) in order to take bulk requests with an explicit index that is set per record .
.... 此外,您的 Elasticsearch 集群的 rest.action.multi.allow_explicit_index 选项必须设置为 true(默认) ,以便使用为每个记录设置的显式索引处理批量请求。 For more information, see Amazon ES Configure Advanced Options in the Amazon Elasticsearch Service Developer Guide.
有关更多信息,请参阅 Amazon Elasticsearch Service 开发人员指南中的 Amazon ES 配置高级选项。
but i can't find any documentation of how to do it, and moreover firehose configuration requires index name.但我找不到任何有关如何执行此操作的文档,而且 firehose 配置需要索引名称。
this try didnt work:这个尝试没有用:
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
});
assistance will be appreciated将不胜感激
It's quite a while since asked, but still... According to Kinesis FAQs ( https://aws.amazon.com/kinesis/data-firehose/faqs/ ):自问以来已经有一段时间了,但仍然......根据 Kinesis 常见问题解答( https://aws.amazon.com/kinesis/data-firehose/faqs/ ):
A single delivery stream can only deliver data to one Amazon Elasticsearch Service domain and one index currently.
单个传输流目前只能将数据传输到一个 Amazon Elasticsearch Service 域和一个索引。 If you want to have data delivered to multiple Amazon Elasticsearch domains or indexes, you can create multiple delivery streams.
如果您希望将数据传输到多个 Amazon Elasticsearch 域或索引,您可以创建多个传输流。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.