gpt4 book ai didi

api - 错误:[mapper_parsing_exception]根映射定义具有不受支持的参数: “Elasticserach”

转载 作者:行者123 更新时间:2023-12-02 23:43:45 31 4
gpt4 key购买 nike

我正在尝试将SendGrid事件发送到kibana,出现以下错误

[root@elasticsearch-7 /]# sendgrid-event-logger

Installing template..
ERROR:[mapper_parsing_exception] Root mapping definition has unsupported parameters: [log : {dynamic_templates=[{string_fields={mapping={fielddata={format=disabled}, index=analyzed, omit_norms=true, type=string, fields={raw={index=not_analyzed, type=string}}}, match_mapping_type=string, match=*}}], properties={date={format=yyyy.MM.dd, type=date}, sg_message_id={index=not_analyzed, type=string}, ip={index=not_analyzed, type=ip}, sg_event_id={index=not_analyzed, type=string}, event={index=not_analyzed, type=string}, email={fielddata={format=disabled}, index=analyzed, omit_norms=true, type=string, fields={domain={analyzer=email_domain_analyzer, index=analyzed, type=string}, raw={index=not_analyzed, type=string}}}, timestamp={format=epoch_second, type=date}}}] :: {"path":"/_template/sendgrid_template","query":{},"body":"{\"template\":\"mail-*\",\"settings\":{\"number_of_shards\":1,\"index\":{\"analysis\":{\"tokenizer\":{\"email_domain_tokenizer\":{\"type\":\"pattern\",\"pattern\":\"^.+@\",\"group\":-1}},\"analyzer\":{\"email_domain_analyzer\":{\"type\":\"custom\",\"tokenizer\":\"email_domain_tokenizer\"}}}}},\"mappings\":{\"log\":{\"dynamic_templates\":[{\"string_fields\":{\"match\":\"*\",\"match_mapping_type\":\"string\",\"mapping\":{\"type\":\"string\",\"index\":\"analyzed\",\"omit_norms\":true,\"fielddata\":{\"format\":\"disabled\"},\"fields\":{\"raw\":{\"type\":\"string\",\"index\":\"not_analyzed\"}}}}}],\"properties\":{\"email\":{\"type\":\"string\",\"index\":\"analyzed\",\"omit_norms\":true,\"fielddata\":{\"format\":\"disabled\"},\"fields\":{\"raw\":{\"type\":\"string\",\"index\":\"not_analyzed\"},\"domain\":{\"type\":\"string\",\"index\":\"analyzed\",\"analyzer\":\"email_domain_analyzer\"}}},\"timestamp\":{\"type\":\"date\",\"format\":\"epoch_second\"},\"date\":{\"type\":\"date\",\"format\":\"yyyy.MM.dd\"},\"event\":{\"type\":\"string\",\"index\":\"not_analyzed\"},\"ip\":{\"type\":\"ip\",\"index\":\"not_analyzed\"},\"sg_event_id\":{\"type\":\"string\",\"index\":\"not_analyzed\"},\"sg_message_id\":{\"type\":\"string\",\"index\":\"not_analyzed\"}}}},\"aliases\":{\"mail\":{}}}","statusCode":400,"response":"{\"error\":{\"root_cause\":[{\"type\":\"mapper_parsing_exception\",\"reason\":\"Root mapping definition has unsupported parameters: [log : {dynamic_templates=[{string_fields={mapping={fielddata={format=disabled}, index=analyzed, omit_norms=true, type=string, fields={raw={index=not_analyzed, type=string}}}, match_mapping_type=string, match=*}}], properties={date={format=yyyy.MM.dd, type=date}, sg_message_id={index=not_analyzed, type=string}, ip={index=not_analyzed, type=ip}, sg_event_id={index=not_analyzed, type=string}, event={index=not_analyzed, type=string}, email={fielddata={format=disabled}, index=analyzed, omit_norms=true, type=string, fields={domain={analyzer=email_domain_analyzer, index=analyzed, type=string}, raw={index=not_analyzed, type=string}}}, timestamp={format=epoch_second, type=date}}}]\"}],\"type\":\"mapper_parsing_exception\",\"reason\":\"Failed to parse mapping [_doc]: Root mapping definition has unsupported parameters: [log : {dynamic_templates=[{string_fields={mapping={fielddata={format=disabled}, index=analyzed, omit_norms=true, type=string, fields={raw={index=not_analyzed, type=string}}}, match_mapping_type=string, match=*}}], properties={date={format=yyyy.MM.dd, type=date}, sg_message_id={index=not_analyzed, type=string}, ip={index=not_analyzed, type=ip}, sg_event_id={index=not_analyzed, type=string}, event={index=not_analyzed, type=string}, email={fielddata={format=disabled}, index=analyzed, omit_norms=true, type=string, fields={domain={analyzer=email_domain_analyzer, index=analyzed, type=string}, raw={index=not_analyzed, type=string}}}, timestamp={format=epoch_second, type=date}}}]\",\"caused_by\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"Root mapping definition has unsupported parameters: [log : {dynamic_templates=[{string_fields={mapping={fielddata={format=disabled}, index=analyzed, omit_norms=true, type=string, fields={raw={index=not_analyzed, type=string}}}, match_mapping_type=string, match=*}}], properties={date={format=yyyy.MM.dd, type=date}, sg_message_id={index=not_analyzed, type=string}, ip={index=not_analyzed, type=ip}, sg_event_id={index=not_analyzed, type=string}, event={index=not_analyzed, type=string}, email={fielddata={format=disabled}, index=analyzed, omit_norms=true, type=string, fields={domain={analyzer=email_domain_analyzer, index=analyzed, type=string}, raw={index=not_analyzed, type=string}}}, timestamp={format=epoch_second, type=date}}}]\"}},\"status\":400}"}

最佳答案

看来您正在运行ES 7,并且sendgrid-event-logger已有4年没有更新了。不再支持多种映射类型,默认映射类型现在称为_doc,而sendgrid-event-logger使用自定义的一种名为log。因此,您需要进行以下三个更改,并且它应该起作用。

  • lib/elasticsearch-template.json 中,只需在第24行更改以下内容:

  • 更换
    "log"
    "_doc"
  • lib/parser.js 中,在第43行进行以下更改:

  • 拉普拉斯
    _type: 'log'
    _type: '_doc'
  • lib/server.js 中,在第43行进行以下更改:

  • 拉普拉斯
    type: 'log'
    type: '_doc'
    它应该工作

    关于api - 错误:[mapper_parsing_exception]根映射定义具有不受支持的参数: “Elasticserach”,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63050876/

    31 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com