{
"error": {
"root_cause": [
{
"type": "mapper_parsing_exception",
"reason": "Root mapping definition has unsupported parameters: [man : {properties={date={format=yyyy-MM-dd HH:mm:ss||yyyy-MM-dd||epoch_millis, type=date}, country={type=keyword}, name={type=text}, age={type=integer}}}]"
}
],
"type": "mapper_parsing_exception",
"reason": "Failed to parse mapping [_doc]: Root mapping definition has unsupported parameters: [man : {properties={date={format=yyyy-MM-dd HH:mm:ss||yyyy-MM-dd||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: [man : {properties={date={format=yyyy-MM-dd HH:mm:ss||yyyy-MM-dd||epoch_millis, type=date}, country={type=keyword}, name={type=text}, age={type=integer}}}]"
}
},
"status": 400
}
elasticsearch7默认不在支持指定索引类型,默认索引类型是_doc,如果想改变,则配置include_type_name: true 即可(这个没有测试,官方文档说的,无论是否可行,建议不要这么做,因为elasticsearch8后就不在提供该字段)。
{
"settings": {
"number_of_shards": 3,
"number_of_replicas": 1
},
"mappings" : {
"properties" : {
"name": {
"type": "text"
},
"country": {
"type": "keyword"
},
"age": {
"type": "integer"
},
"date": {
"type": "date",
"format": "yyyy-MM-dd HH:mm:ss||yyyy-MM-dd||epoch_millis"
}
}
}
}
这个问题解决了没?如果解决了,怎么解决的?
我也这个错,一脸懵逼...