基于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={}}]
可能是一些过时的版本?我应该更新什么?