I am learning elasticsearch. I have specified the mapping in \'mapping.json\'. Its contents are
{
\"book\" : {
\"_index\" : {
\"enabled
Please try this,
curl -XPUT 'http://localhost:9200/<indexname>/book/_mapping' -d @mapping.json
command
curl -XPUT localhost:9200/_template/logstash -d @/Users/template.json
response
{"acknowledged":true}
On AWS I got an error like
{"error":"Content-Type header [application/x-www-form-urlencoded] is not supported","status":406}
To fix it I added
-H 'Content-Type: application/json'