【发布时间】:2016-10-09 02:01:38
【问题描述】:
如果这是一个基本问题,我提前道歉,但这是我第一次涉足 ES。如何定位 Json 文件并将其索引到 ES 中进行索引?
我已经查看了与我的类似的 ES 文档和问题,但到目前为止列出的方法都没有对我有用。
Import/Index a JSON file into Elasticsearch
is there any way to import a json file(contains 100 documents) in elasticsearch server.?
我使用的是 Mac OS,我用来 _bulk 我的 Json 文件的 cURL 命令是这样的:
curl -XPOST 'localhost:9200/bank/account/_bulk?pretty' --data-binary "@accounts.json"
但是,弹出这个错误:
{
"error": {
"root_cause": [
{
"type": "parse_exception",
"reason": "Failed to derive xcontent"
}
],
"type": "parse_exception",
"reason": "Failed to derive xcontent"
},
"status": 400
}
【问题讨论】:
标签: elasticsearch