简体   繁体   English

使用单个 Firehose 将数据索引到多个索引

[英]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.

相关问题 如何使用单个索引分别对多个字段进行排序 - How to sort on multiple fields individually using a single index 如何从nodejs应用程序生成数据到firehose - how to produce data from nodejs app to firehose 使用Node.js在单个请求中发送多个数据 - Send multiple data in a single request using Node.js 使用单个数据模型架构创建具有不同名称的多个集合 - Using a single Data Model Schema to create multiple collections with different names 使用nodejs lambda在不使用Firehose的情况下将Kinesis转换为S3 - Kinesis to S3 without firehose using nodejs lambda 如何在索引页面上使用EJS快速遍历并显示来自多个模型的数据 - How to loop through and display data from multiple models in express using EJS on the index page React js:在单个页面应用程序中呈现多个索引html - React js : Rendering multiple index html in a single page applications 如何使用AWS Lambda和DynamoDB在单个userId下持久存储多个用户的数据? - How to persist multiple users' data under a single userId using AWS Lambda and DynamoDB? Node JS在索引而不是索引处显示值 - Node JS displaying value at index instead of indices 使用expressjs mysql,nodejs在单个数组中索引两个查询的结果 - index results of two queries in a single array, using expressjs mysql, nodejs
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM