Kibana:可以在Sense Web Plugin上导入Shakespeare.json [英] Kibana: Cant import Shakespeare.json on Sense Web Plugin

查看:510
本文介绍了Kibana:可以在Sense Web Plugin上导入Shakespeare.json的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



[环境]

    我正在尝试按弹性搜索教程导入shakespeare.json。
  1. 弹性搜索2.1

  2. Chrome浏览器的升级版

[背景]



当我粘贴 curl -XPUT localhost:9200 / _bulk --data-binary @ shakespeare.json
在感应选项卡上(扩展名打开一个带有2个窗口的新选项卡)
将其转换为 PUT / _bulk ,输出为

  {
error:{
root_cause:[
{
type :parse_exception,
reason:无法获取xcontent
}
],
type:parse_exception,
reason :无法获取xcontent
},
status:400
}

[我的发现]


  1. 我已经在本地下载了shakespeare.json,但我认为Sense不是
    能找到文件所在的路径(可能是我的文件位置不正确)

  2. 我也尝试找到Sense的当前目录,但我不知道我在哪里可以找到索引

  3. 无论我找到什么文件,都是Linux特定的。

任何输入都赞赏。

解决方案

你不应该在Sense中做到这一点,只是从命令行

  curl -XPUT localhost:9200 / _bulk --data-binary @ shakespeare.json 

确保指向 shakespeare.json 文件的正确路径,如果它是不在您所在的目录。

  curl -XPUT localhost:9200 / _bulk --data-binary @ / path /to/shakespeare.json 

更新



如果您在Windows上运行,并且没有cURL命令,您可以downlo https://curl.haxx.se/download.html 上的广告cURL


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.

解决方案

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

这篇关于Kibana:可以在Sense Web Plugin上导入Shakespeare.json的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆