The mapping definition cannot be nested under a type [_doc] unless include_type_name is set to true
创建es索引模板时报错,因为es7不支持type了,只有一个默认的_doc。解决方法:在url里设置 include_type_name=falsePUT http://10.10.101.140:30092/_template/testaa?include_type_name=false{"order":1,"index_patterns":["testaa-*"],"mappings":{"_
·
创建es索引模板时报错,因为es7不支持type了,只有一个默认的_doc。
解决方法:在url里设置 include_type_name=true
PUT http://10.10.101.140:30092/_template/testaa?include_type_name=true
{
"order":1,
"index_patterns":["testaa-*"],
"mappings":{
"_doc":{
"properties":{
"middleware_name":{
"type":"keyword",
"index":true
},
"k8s_pod_namespace":{
"type":"keyword",
"index":true
},
"query":{
"type":"text",
"index":true,
"analyzer":"ik_max_word"
}
}
}
},
"settings":{
"index": {
"max_result_window": "30000000"
}
}
}
Error create index template in ES 6.7 - Elasticsearch - Discuss the Elastic Stack
更多推荐
已为社区贡献17条内容
所有评论(0)