问答详情
源自:4-1 索引创建

put提交错误,请问该如何解决

我的es是6.4.0版本的 报错如下:

{

    "error": {

        "root_cause": [

            {

                "type": "mapper_parsing_exception",

                "reason": "No handler for type [data] declared on field [data]"

            }

        ],

        "type": "mapper_parsing_exception",

        "reason": "Failed to parse mapping [man]: No handler for type [data] declared on field [data]",

        "caused_by": {

            "type": "mapper_parsing_exception",

            "reason": "No handler for type [data] declared on field [data]"

        }

    },

    "status": 400

}


请问我该如何修改:

{

"settings": {

"number_of_shards": 3,

"number_of_replicas": 1

},

"mappings": {

"man": {

"properties": {

"name": {

"type": "text"

},

"country": {

"type": "keyword"

},

"age": {

"type": "data"

},

"data": {

"type": "data",

"format": "yyyy-MM-dd HH:mm:ss||yyyy-MM-DD||epoch_millis"

}

}

},

"woman": {

}

}

}


提问者:kennethwoman 2018-10-09 12:28

个回答

  • 慕工程9317219
    2018-11-05 19:27:28

    你那个不能重复提交 提交第二次就会报错

  • tinylight
    2018-10-16 09:34:58

    No handler for type [data] declared on field [data],应该是下图的位置处问题了,你查看一下是不是date写成了data

    https://img4.mukewang.com/5bc5400d00014aaf04810082.jpg