Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
586 views
in Technique[技术] by (71.8m points)

windows - Kibana: Cant import Shakespeare.json on Sense Web Plugin

I am trying to import shakespeare.json as per elastic search tutorial.

[Environment]

  1. Elastic Search 2.1
  2. Sense -Extension for Chrome

[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]

  1. I have downloaded shakespeare.json locally, but I think Sense is not able to locate the path where the file resides(May be, I have the file at incorrect location)
  2. I also tried finding the current directory for Sense, but I am not sure where would I find the index.html for chrome-extension in windows for this plug-in.
  3. Whatever documentation I found, is Linux specific.

Any inputs appreciated.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...