我想根据弹性搜索教程(https://www.elastic.co/guide/en/kibana/current/getting-started.html)使用_bulk api导入accounts.json数据。我正在使用google-chrome的Sense插件来完成此任务。Elasticsearch - 在Windows中使用Sense Web Plugin进行批量插入
当我粘贴url curl -XPOST 'localhost:9200/bank/account/_bulk?pretty' --data-binary @accounts.json
上感,其转换为POST /bank/account/_bulk?pretty
。
这里的解决方案:Kibana: Cant import Shakespeare.json on Sense Web Plugin,说,使用CURL命令。但在Windows上,curl命令无法识别。
curl -XPUT localhost:9200/_bulk --data-binary @shakespeare.json 'curl' is not recognized as an internal or external command, operable program or batch file.
您可以下载卷曲的Windows在https://curl.haxx.se/download.html – Val
@val这也无法正常工作,得到这个错误:'curl -XPOST'localhost:9200/bank/account/_bulk?pretty'--data-binary @ accounts.json' 'curl:(6)Could not resolve host:' localhost'' –
好吧,我明白了,它可以用于:'curl -XPOST localhost:9200/bank/account/_bulk?pretty --data-binary @ accounts.json'。非常感谢:) –