Tag Archives: Root mapping definition has unsupported parameters

[Solved] reason”: “Root mapping definition has unsupported parameters:

1. An error was reported when Kibana created the index, and the elasticsearch version used was version 7.2.1.

 1 PUT /person
 2 {
 3   "settings": {
 4     "number_of_shards": "10",
 5     "number_of_replicas": "0",
 6     "refresh_interval": "-1"
 7   },
 8   "mappings": {
 9     "properties": {
10       "update_time": {
11         "format": "yyyy-MM-dd HH:mm:ss",
12         "type": "date"
13       },
14       "username": {
15         "type": "keyword"
16       },
17       "address": {
18         "type": "keyword"
19       }
20     }
21   }
 22 }

Report an error as follows:

 1 {
 2     "error": {
 3         "root_cause": [{
 4             "type": "mapper_parsing_exception",
 5             "reason": "Root mapping definition has unsupported parameters:  [project_evaluate : {properties={update_time={format=yyyy-MM-dd HH:mm:ss, type=date}, username={type=keyword}, address={type=keyword}}}]"
 6         }],
 7         "type": "mapper_parsing_exception",
 8         "reason": "Failed to parse mapping [_doc]: Root mapping definition has unsupported parameters:  [project_evaluate : {properties={update_time={format=yyyy-MM-dd HH:mm:ss, type=date}, username={type=keyword}, address={type=keyword}}}]",
 9         "caused_by": {
10             "type": "mapper_parsing_exception",
11             "reason": "Root mapping definition has unsupported parameters:  [project_evaluate : {properties={update_time={format=yyyy-MM-dd HH:mm:ss, type=date}, username={type=keyword}, address={type=keyword}}}]"
12         }
13     },
14     "status": 400
15 }

The specific reason is that ElasticSearch 7.x no longer supports the specified index type by default. Therefore, the index type is not specified in ElasticSearch 7.x, and the index creation is successful.

However, there is no problem when ElasticSearch 6.x is executed. Elasticsearch7 does not support the specified index type by default. The default index type is _doc. The index is no longer recommended to create an index type, just use the default. Because elasticsearch8 will not provide this field.