number_ of_ Shards
the number of primary partitions per index. The default value is 5. This configuration cannot be modified after index creation
number_ of_ Replicas
the number of copies per master partition. The default value is 1. For an active index library, this configuration can be modified at any time
PUT /test2
{
"settings": {
"number_of_shards": 3,
"number_of_replicas": 0
},
"mappings": {
"user":{
"properties":{
"id":{
"type":"long"
},
"title":{
"type":"text",
"analyzer":"ik_max_word"
},
"content":{
"type":"text",
"analyzer":"ik_max_word"
},
"postdate":{
"type":"date"
},
"url":{
"type":"text"
}
}
}
}
}
Error: Root mapping definition has unsupported parameters
{
"error": {
"root_cause": [
{
"type": "mapper_parsing_exception",
"reason": "Root mapping definition has unsupported parameters: [user : {properties={postdate={type=date}, id={type=long}, title={analyzer=ik_max_word, type=text}, content={analyzer=ik_max_word, type=text}, url={type=text}}}]"
}
],
"type": "mapper_parsing_exception",
"reason": "Failed to parse mapping [_doc]: Root mapping definition has unsupported parameters: [user : {properties={postdate={type=date}, id={type=long}, title={analyzer=ik_max_word, type=text}, content={analyzer=ik_max_word, type=text}, url={type=text}}}]",
"caused_by": {
"type": "mapper_parsing_exception",
"reason": "Root mapping definition has unsupported parameters: [user : {properties={postdate={type=date}, id={type=long}, title={analyzer=ik_max_word, type=text}, content={analyzer=ik_max_word, type=text}, url={type=text}}}]"
}
},
"status": 400
}
after checking the official website example, it is found that 7.4 does not support the specified index type by default, and the default index type is_ Doc (implied: include_ type_ name=false)。 See official website: https://www.elastic.co/guide/en/elasticsearch/reference/current/removal-of-types.html#_ typeless_ apis_ in_ 7_ 0
To be amended as follows:
PUT /test2
{
"settings": {
"number_of_shards": 3,
"number_of_replicas": 0
},
"mappings": {
"properties":{
"id":{
"type":"long"
},
"title":{
"type":"text",
"analyzer":"ik_max_word"
},
"content":{
"type":"text",
"analyzer":"ik_max_word"
},
"postdate":{
"type":"date"
},
"url":{
"type":"text"
}
}
}
}
Success
{
"acknowledged" : true,
"shards_acknowledged" : true,
"index" : "test2"
}
elasticsearch Reported error in exceptions.RequestError(400, u’mapper_parsing_exception’, u’No handler field
Error reported when creating index index in ElasticSearch: elasticsearch.exceptions.RequestError: RequestError(400, u’mapper_parsing_exception ‘, u’No handler for type [string] declared on field [link]’).
Reason: What version of ElasticSearch are you using? Versions 5.X and above don’t have string types anymore, and have switched to text and keyword as string types. </strong
Replace.
Similar Posts:
- [Solved] reason”: “Root mapping definition has unsupported parameters:
- [Solved] Elasticsearch:exception [type=search_phase_execution_exception, reason=all shards failed]
- Fielddata is disabled on text fields by default. Set fielddata=true on [gender] in order to load …
- Elasticsearch error mapper_ parsing_ exception
- [Solved] Elasticsearch Error: “java.lang.IllegalArgumentException: Rejecting mapping update to [xxx] as the final mapping would have more than 1 type: [_doc, log]””
- Compressor detection can only be called on some ……
- [ Elasticsearch-PHP] No alive nodes found in your cluster in
- ES Error:”illegal_argument_exception” [How to Solve]
- Org.yaml.snakeyaml.parser.ParserException: while parsing a block mapping