创建es索引模板时报错,因为es7不支持type了,只有一个默认的_doc。
解决方法:在url里设置 include_type_name=true文章来源:https://www.toymoban.com/news/detail-529060.html
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文章来源地址https://www.toymoban.com/news/detail-529060.html
到了这里,关于The mapping definition cannot be nested under a type [_doc] unless include_type_name is set to true的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!