Elasticsearch7.1.0 mappings problem

{
"settings":{
	"number_of_shards":3,
	"number_of_replicas":1
},
"mappings":{
	"man":{
		"properties":{
			"name":{
				"type":"text"
			},
			"country":{
				"type":"keyword"
			},
			"age":{
				"type":"integer"
			},
			"date":{
				"type":"date",
				"format":"epoch_millis"
			}
		}
	}
}
}

the errors:

{
    "error": {
        "root_cause": [
            {
                "type": "mapper_parsing_exception",
                "reason": "Root mapping definition has unsupported parameters:  [man : {properties={date={format=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=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=epoch_millis, type=date}, country={type=keyword}, name={type=text}, age={type=integer}}}]"
        }
    },
    "status": 400
}

help me please

Please format your code, logs or configuration files using </> icon as explained in this guide and not the citation button. It will make your post more readable.

Or use markdown style like:

```
CODE
```

This is the icon to use if you are not using markdown format:

There's a live preview panel for exactly this reasons.

Lots of people read these forums, and many of them will simply skip over a post that is difficult to read, because it's just too large an investment of their time to try and follow a wall of badly formatted text.
If your goal is to get an answer to your questions, it's in your interest to make it as easy to read and understand as possible.

I edited it for you but please do it next time. Thanks!

Coming back to your question, you need to remove the type name.

    {
	"settings":{
		"number_of_shards":3,
		"number_of_replicas":1
	},
	"mappings":{
			"properties":{
				"name":{
					"type":"text"
				},
				"country":{
					"type":"keyword"
				},
				"age":{
					"type":"integer"
				},
				"date":{
					"type":"date",
					"format":"epoch_millis"
				}
			}
	}
    }

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.