发送put请求报错400

来源:4-1 索引创建

qq_Onecallaway_1

2021-01-13 17:17

我的是elasticsearch5点几的版本下面是我的json和报错信息

{

"settings": {

"number_of_shards":3,

"number_of_replicas":1

},

"mappings":{

"properties": {

"name": {

"type": "text"

},

"country": {

"type": "keyword"

},

"age": {

"type": "integer"

},

"data": {

"type": "date",

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

}

}

}

报错如下:

{

"error": {

"root_cause": [

{

"type": "mapper_parsing_exception",

"reason": "Root mapping definition has unsupported parameters:  [birthday : {format=yyyy-MM-dd HHmmss||yyyyMMdd||epoch_millis, type=date}] [country : {type=keyword}] [name : {type=text}] [age : {type=integer}]"

}

],

"type": "mapper_parsing_exception",

"reason": "Failed to parse mapping [properties]: Root mapping definition has unsupported parameters:  [birthday : {format=yyyy-MM-dd HHmmss||yyyyMMdd||epoch_millis, type=date}] [country : {type=keyword}] [name : {type=text}] [age : {type=integer}]",

"caused_by": {

"type": "mapper_parsing_exception",

"reason": "Root mapping definition has unsupported parameters:  [birthday : {format=yyyy-MM-dd HHmmss||yyyyMMdd||epoch_millis, type=date}] [country : {type=keyword}] [name : {type=text}] [age : {type=integer}]"

}

},

"status": 400

}


写回答 关注

0回答

还没有人回答问题,可以看看其他问题

ElasticSearch入门

ElasticSearch轻松入门,Spring Boot集成ES

67740 学习 · 302 问题

查看课程

相似问题