elasticsearch,Curl,elasticsearch" /> elasticsearch,Curl,elasticsearch" />

Curl PUT:使用elasticsearch未找到命令

Curl PUT:使用elasticsearch未找到命令,curl,elasticsearch,Curl,elasticsearch,我是ElasticSearch的新手,我正在遵循其官方网站上的指南。 当我尝试指南中给出的速记语法时 PUT /megacorp/employee/1 { "first_name" : "John", "last_name" : "Smith", "age" : 25, "about" : "I love to go rock climbing", "interests": [ "sports", "music" ] } 我的终

我是ElasticSearch的新手,我正在遵循其官方网站上的指南。 当我尝试指南中给出的速记语法时

PUT /megacorp/employee/1
{
    "first_name" : "John",
    "last_name" :  "Smith",
    "age" :        25,
    "about" :      "I love to go rock climbing",
    "interests": [ "sports", "music" ]
}
我的终端给出了这个错误

PUT:未找到命令


请告诉我我错过了什么把戏

PUT不是命令,您需要使用类似curl的命令,请尝试以下操作:

curl -PUT http://localhost:9200/megacorp/employee/1 -d '
{
    "first_name" : "John",
    "last_name" :  "Smith",
    "age" :        25,
    "about" :      "I love to go rock climbing",
    "interests": [ "sports", "music" ]
}'

PUT不是命令,您需要使用类似于curl的命令,请尝试以下操作:

curl -PUT http://localhost:9200/megacorp/employee/1 -d '
{
    "first_name" : "John",
    "last_name" :  "Smith",
    "age" :        25,
    "about" :      "I love to go rock climbing",
    "interests": [ "sports", "music" ]
}'

它工作正常,但正如官方指南中提到的,我们可以使用PUT/megacorp/employee/1这样的速记格式,而不是带curl的整个语句,这对meit不起作用,但正如官方指南中提到的,我们可以使用PUT/megacorp/employee/1这样的速记格式,而不是带curl的整个语句,那对我不起作用