創(chuàng)建es索引模板時報(bào)錯,因?yàn)閑s7不支持type了,只有一個默認(rèn)的_doc。
解決方法:在url里設(shè)置 include_type_name=true文章來源:http://www.zghlxwxcb.cn/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文章來源地址http://www.zghlxwxcb.cn/news/detail-529060.html
到了這里,關(guān)于The mapping definition cannot be nested under a type [_doc] unless include_type_name is set to true的文章就介紹完了。如果您還想了解更多內(nèi)容,請?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!