I created the Index manually (Mappings and Settings sections) instead of letting ElasticSearch create one. I am able to see the structure of the "animals" index file. It looks like below.
When I use PUT command to insert a document it throws the error.
PUT /animals/_doc/
{ "animal-type":"carnivore",
"eating-type": "chewing",
"legs": 4,
"name": "Dog",
"tail": true
}
{
"animals": {
"aliases": {},
"mappings": {
"doc": {
"properties": {
"animal-type": {
"type": "text"
},
"eating-type": {
"type": "text"
},
"legs": {
"type": "integer"
},
"name": {
"type": "text",
"analyzer": "standard"
},
"tail": {
"type": "boolean"
}
}
}
},
"settings": {
"index": {
"creation_date": "1520447645771",
"number_of_shards": "2",
"number_of_replicas": "2",
"uuid": "r6CMK66vSlqt669SsRWnvA",
"version": {
"created": "6020299"
},
"provided_name": "animals"
}
}
}
}