PUT:使用elasticsearch找不到命令

 手机用户2502913137 发布于 2022-12-07 15:46

我是ElasticSearch的新手,我正在关注其官方网站上的指南.当我尝试在指南中给出的速记语法即

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

我的终端给出了这个错误

PUT:找不到命令

请指导我错过哪些技巧?

1 个回答
  • 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

    2022-12-11 03:11 回答
撰写答案
今天,你开发时遇到什么问题呢?
立即提问
热门标签
PHP1.CN | 中国最专业的PHP中文社区 | PNG素材下载 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有