I have downloaded accounts.json from here and saved it in my local drive . Path is E:\data\accounts.json
Now when I fired POST /bank/account/_bulk?pretty --data-binary E:\data\accounts.json
I am getting below error
{
"error": {
"root_cause": [
{
"type": "parse_exception",
"reason": "Failed to derive xcontent"
}
],
"type": "parse_exception",
"reason": "Failed to derive xcontent"
},
"status": 400
}
Please suggest what needs to be done here . I believe bulk command is not able to pick the file path.
i have this type of document, and i am using bulk api like this
curl -XPOST 'localhost:9200/test/test_tech/_bulk?pretty' --data-binary '@filename.json'
and got error
Warning: Couldn't read data from file "filename.json", this makes
Warning: an empty POST.
{
"error" : {
"root_cause" : [ {
"type" : "parse_exception",
"reason" : "Failed to derive xcontent"
} ],
"type" : "parse_exception",
"reason" : "Failed to derive xcontent"
},
"status" : 400
}
i think problem here is in my "text_content" field,because it contains so many type of character .so how i load data in ES?
Also you have another problem with CURL. May be running on Windows?
Whatever, have a look at curl documentation to see how to pass a document. Otherwise, switch to SENSE / CONSOLE in Kibana which is easier to use.
Hi dadoonet,
curl command is running good with other json file...i think problem here is to how to capture the "text_content" field text to form right json format..can you please help me for that?
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.