我是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" ] }'
http://curl.haxx.se/docs/manpage.html
http://www.elasticsearchtutorial.com/elasticsearch-in-5-minutes.html