gpt4 book ai didi

elasticsearch - elasticsearct puttemplate。 [mapper_parsing_exception]根映射定义具有不受支持的参数

转载 作者:行者123 更新时间:2023-12-03 02:27:04 34 4
gpt4 key购买 nike

使模板基于https://github.com/vanthome/winston-elasticsearch/blob/master/index-template-mapping.json

 {
"index_patterns": ["applogs-*"],
"settings": {
"number_of_shards": 1

},
"mappings": {
"_source": { "enabled": true },
"properties": {
"@timestamp": { "type": "date" },
"@version": { "type": "keyword" },
"message": { "type": "text", "index": true },
"severity": { "type": "keyword", "index": true },
"geohash":{ "type": "geo-point", "index": true},
"location":{ "type": "geo-point", "index": true},
}
}
}

但出现错误
[mapper_parsing_exception] Root mapping definition has unsupported parameters:  [severity : {index=true, type=keyword}] [@timestamp : {type=date}] [@version : {type=keyword}] [message : {index=true, type=text}] [fields : {dynamic=true, properties={}}]

可能是一些过时的版本?我应该更新什么?

最佳答案

基于docs:

PUT _template/template_1
{
"index_patterns": [
"applogs-*"
],
"settings": {
"number_of_shards": 1
},
"mappings": {
"_source": {
"enabled": true
},
"properties": {
"@timestamp": {
"type": "date"
},
"@version": {
"type": "keyword"
},
"message": {
"type": "text",
"index": true
},
"severity": {
"type": "keyword",
"index": true
},
"geohash": {
"type": "geo_point",
"index": true
},
"location": {
"type": "geo_point",
"index": true
}
}
}
}

您的json无效(一个逗号太多),还有 geo-point-> geo_point

关于elasticsearch - elasticsearct puttemplate。 [mapper_parsing_exception]根映射定义具有不受支持的参数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60839559/

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