I am trying to import shakespeare.json as per elastic search tutorial.
[Environment]
[Background]
When I paste curl -XPUT localhost:9200/_bulk --data-binary @shakespeare.json
on the sense tab(the extensions opens a new tab with 2 windows)
It's converted to PUT /_bulk
and the output is
{
"error": {
"root_cause": [
{
"type": "parse_exception",
"reason": "Failed to derive xcontent"
}
],
"type": "parse_exception",
"reason": "Failed to derive xcontent"
},
"status": 400
}
[My Findings]
Any inputs appreciated.
You should not do this in Sense, but simply from the command line
curl -XPUT localhost:9200/_bulk --data-binary @shakespeare.json
Make sure to point to the correct path of the shakespeare.json
file if it is not located in the directory you're in.
curl -XPUT localhost:9200/_bulk --data-binary @/path/to/shakespeare.json
UPDATE
If you run on Windows and you don't have the cURL command present, you can download cURL at https://curl.haxx.se/download.html