curl -X POST -d @mapping.json + mapping not created

后端 未结 3 1272
滥情空心
滥情空心 2021-02-20 15:43

I am learning elasticsearch. I have specified the mapping in \'mapping.json\'. Its contents are

{
    \"book\" : {
         \"_index\" : {
             \"enabled         


        
3条回答
  •  谎友^
    谎友^ (楼主)
    2021-02-20 16:23

    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'
    

提交回复
热议问题