gpt4 book ai didi

elasticsearch - elasticsearch批量加载中的@param是什么

转载 作者:行者123 更新时间:2023-12-03 01:56:20 24 4
gpt4 key购买 nike

我正在关注本教程
https://www.elastic.co/guide/en/kibana/current/getting-started.html

我下载了示例json文件并将其放入
/mydirectory/data/accounts.json

根据文档,您将输入
curl -XPOST'localhost:9200 / bank / account / _bulk?pretty'--data-binary @ accounts.json

当然那你会得到一个错误
{
“状态代码”:400,
“错误”:“错误请求”,
“message”:“ child \” uri \“失败,因为[\” uri \“必须是有效的uri]”,
“验证”:{
“source”:“查询”,
“键”:[
“uri”
]
}
}

因为无论如何我看不到指示存储json文件的目录。您如何知道要在哪里找到搜索。我到处搜寻Google,很惊讶找不到答案。其他人如何解决呢?

最佳答案

您需要在@字符后指定完整路径,如下所示

curl -XPOST 'localhost:9200/bank/account/_bulk?pretty' --data-binary @/mydirectory/data/accounts.json

另一种方法是先运行 cd /mydirectory/data,然后可以使用
curl -XPOST 'localhost:9200/bank/account/_bulk?pretty' --data-binary @accounts.json

关于elasticsearch - elasticsearch批量加载中的@param是什么,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36345657/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com