首页 > 解决方案 > uri [/test/] 和方法 [POST] 的 HTTP 方法不正确,允许:[PUT、HEAD、DELETE、GET]

问题描述

我想使用 crul 将 json 导入弹性,下面是命令和错误

curl -XPUT "http://localhost:9200/test/"
 -H "Content-Type: application/json" -d @City_collection.json

我正在低于错误。请帮助我

    {"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"unknown s
etting [index.City2] please check that any required plugins are installed, or ch
eck the breaking changes documentation for removed settings"}],"type":"illegal_a
rgument_exception","reason":"unknown setting [index.City2] please check that any
 required plugins are installed, or check the breaking changes documentation for
 removed settings"},"status":400}

我的json文件如下:

{ "_id" : { "$oid" : "5b45f0c652fdfb145c6dfc74" }, "City" : "Irvine", "City_id" : 0 }
{ "_id" : { "$oid" : "5b45f0c652fdfb145c6dfc75" }, "City" : "Huntington Beach", "City_id" : 1 }
{ "_id" : { "$oid" : "5b45f0c652fdfb145c6dfc76" }, "City" : "Gardena", "City_id" : 2 }
{ "_id" : { "$oid" : "5b45f0c652fdfb145c6dfc77" }, "City" : "Anaheim", "City_id" : 3 }
{ "_id" : { "$oid" : "5b45f0c652fdfb145c6dfc78" }, "City" : "Placentia", "City_id" : 4 }
{ "_id" : { "$oid" : "5b45f0c652fdfb145c6dfc79" }, "City" : "STE. 208", "City_id" : 5 }
{ "_id" : { "$oid" : "5b45f0c652fdfb145c6dfc7a" }, "City" : "Beverly Hills", "City_id" : 6 }
{ "_id" : { "$oid" : "5b45f0c652fdfb145c6dfc7b" }, "City" : "Quincy", "City_id" : 7 }

标签: elasticsearch

解决方案


推荐阅读