为了账号安全,请及时绑定邮箱和手机立即绑定

book/novel/_mappings 请求时报错, 如何解决

{"error": {},{}"type": "illegal_argument_exception","reason": "Types cannot be provided in put mapping requests, unless the include_type_name parameter is set to true.""root_cause": [],"type": "illegal_argument_exception","reason": "Types cannot be provided in put mapping requests, unless the include_type_name parameter is set to true.""status": 400}


正在回答

2 回答

book/_mapping/novel?include_type_name=true PUT
{
  "novel": {
    "properties": {
      "title": {
        "type": "text"
      }
    }
  }
}

http://img1.sycdn.imooc.com//6396ddb40001e63808030600.jpg

http://img1.sycdn.imooc.com//6396ddc90001bd5508800659.jpg

0 回复 有任何疑惑可以回复我~

{

"settings": {

"number_of_shards": 3,

"number_of_replicas": 1

},

"mappings": {


"properties": {

"name": {

"type": "text"

},

"country": {

"type": "keyword"

},

"age": {

"type": "integer"

}

}

}

}


这样试试呢,type目前高版本已经不支持了


0 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消

book/novel/_mappings 请求时报错, 如何解决

我要回答 关注问题
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号