curl -X POST -d @mapping.json + mapping not created
Please try this,
curl -XPUT 'http://localhost:9200/<indexname>/book/_mapping' -d @mapping.json
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'
command
curl -XPUT localhost:9200/_template/logstash -d @/Users/template.json
response
{"acknowledged":true}