window环境下执行curl命令批量导入json到elasticsearch中
curl -H 'Content-Type: application/x-ndjson' -XPOST 'localhost:9200/bank/account/_bulk?pretty' --data-binary @accounts.json
报错信息
curl: (6) Could not resolve host: application curl: (6) Could not resolve host: 'localhost
解决方法
把命令中的单引号改为双引号
curl -H "Content-Type: application/x-ndjson" -XPOST "localhost:9200/bank/account/_bulk?pretty" --data-binary @accounts.json
重新执行命令,导入成功
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)