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=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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值