I'm going through the Elasticsearch tutorials and i'm trying to load data from the sample file into Elasticsearch and i'm encountering a problem
curl -XPOST 'localhost:9200/bank/account/_bulk?pretty&refresh' --data-binary "@accounts.json"
i'm getting the following message when i run it on the Kibana console. I'm guessing there's an issue with the path of the file, where am i supposed to download the "accounts.json" file, i've downloaded it to the home directory of Elasticsearch, i've tried to put it in bin as well.
{
"error": {
"root_cause": [
{
"type": "parse_exception",
"reason": "Failed to derive xcontent"
}
],
"type": "parse_exception",
"reason": "Failed to derive xcontent"
},
"status": 400
}
Hello, the curl command gets converted in a Kibana console anyways, so it doesn't matter, but here's what i'm running
POST /bank/account/_bulk?pretty&refresh-binary @accounts.json
I'm assuming i'd have to something about the path of this accounts.json file, like i said before i've put in the homedirectory of elastic search
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.