0

I am on Kibana sense trying out the 'Getting Started with Kibana', https://www.elastic.co/guide/en/kibana/current/getting-started.html

I am trying to load the shakespear.json file for starters but am just so confused.

This is the code that I am using,

POST /shakespeare/_bulk?pretty
-binary @shakespeare.json

It returns me with,

{
   "error": {
      "root_cause": [
         {
            "type": "parse_exception",
            "reason": "Failed to derive xcontent"
         }
      ],
      "type": "parse_exception",
      "reason": "Failed to derive xcontent"
   },
   "status": 400
}

I just do not understand where to store the json files for the @shakespear command to read from.

Appreciate any help.

BernardL
  • 5,162
  • 7
  • 28
  • 47
  • This is the answer you're looking for: http://stackoverflow.com/questions/34670624/kibana-cant-import-shakespeare-json-on-sense-web-plugin/34672449#34672449 – Val Jan 12 '16 at 04:25
  • Hey seems to be bout right, do you think you can guide me to know what directory specifically I am in, I know I am hosted on port 9200 but which directory by default will it read from? I have tried moving the file around as well. – BernardL Jan 12 '16 at 04:26
  • Using the `pwd` command you can know in which directory you're in – Val Jan 12 '16 at 04:27
  • Assuming if I the file is stored at d:/data. Would it be right to use; PUT /_bulk -binary @/D:/data/shakespeare.json – BernardL Jan 12 '16 at 04:29
  • 1
    You need to use `curl` don't do that in Sense though. So `curl -XPUT localhost:9200/_bulk --data-binary @d:/data/shakespeare.json`. Or `cd data` first and then `curl -XPUT localhost:9200/_bulk --data-binary @shakespeare.json` – Val Jan 12 '16 at 04:31
  • Sorry i think I understood what you mean, for some reason it does not work in sense, my bad. I just read your whole post. Seems to be working in CMD. Thanks a lot. – BernardL Jan 12 '16 at 04:33
  • You can copy your .json files in the folder of your Curl folder. If you are in Windows machine, you can look for your Curl folder in drive "C" – sinaei Jan 20 '16 at 16:21

0 Answers0