can‘t be changed from nested to non-nested

10226 단어 elasticsearch
{
    "error": {
        "root_cause": [
            {
                "type": "illegal_argument_exception",
                "reason": "object mapping [ty_scenic_list] can't be changed from nested to non-nested"
            }
        ],
        "type": "illegal_argument_exception",
        "reason": "object mapping [ty_scenic_list] can't be changed from nested to non-nested"
    },
    "status": 400
}

내 매핑 type 정의
{
    "mappings":{
         # type
        "ty_zyb_product":{
            "properties":{
                "ty_corp_code":{
                    "type":"keyword"
                },
                "ty_parent_corp_code":{
                    "type":"keyword"
                },
                "ty_scenic_id":{
                    "type":"long"
                },
                "ty_product_id":{
                    "type":"keyword"
                },
                "ty_status":{
                    "type":"keyword"
                },
                "association":{
                    "type":"boolean"
                },
                "zyb_corp_code":{
                    "type":"keyword"
                },
                "zyb_scenic_id":{
                    "type":"keyword"
                },
                "zyb_scenic_name":{
                    "type":"text"
                },
                "zyb_product_code":{
                    "type":"keyword"
                },
                "zyb_product_name":{
                    "type":"text"
                },
                "createTime":{
                    "type":"date",
                    "format": "yyyy-MM-dd HH:mm:ss,SSS||yyyy-MM-dd HH:mm:ss||epoch_millis"
                },
                "modifyTime":{
                    "type":"date",
                    "format": "yyyy-MM-dd HH:mm:ss,SSS||yyyy-MM-dd HH:mm:ss||epoch_millis"
                },
                "ty_scenic_list": {
                    "type": "nested",
                    "properties": {
                        "ty_scenic_id_n": {
                            "type": "long"
                        },
                        "ty_status_n": {
                            "type": "long"
                        }
                    }
                }          
            }
        }
    }
}


이 오류를 보고한 원인은 사실 매우 간단하다. 요청 주소가 맞지 않았다
정확한 작법
                        |              |       type      |
http://192.168.*.*:9200/ty_zyb_product/ty_zyb_product

좋은 웹페이지 즐겨찾기