elasticsearch批量导入数据注意事项

  • 时间:
  • 浏览:1

让你初始化启动kiabna后是这样索引的,当然,将会elasticsearch中导入过数据这样kibana会自动匹配索引

}

  "mappings": {

这里要注意的是 @accounts.json,@shakespeare_6.0.json,@logs.json哪些文件的位置应该有你在身边所在的当前目录,

            }

curl: (6) Could not resolve host: application另一个的错误

    "log": {

 "mappings": {

}

curl -H 'Content-Type: application/x-ndjson' -XPOST 'localhost:950/shakespeare/doc/_bulk?pretty' --data-binary @shakespeare_6.0.json

{

        "geo": {

这是 logs的字段映射

          "properties": {

PUT /logstash-2015.05.18

{

    "text_entry": "String",

    }

    "speech_number": INT,

    "play_name": {"type": "keyword"},

  }

有刚刚向elasticsearch设置字段映射

          }

    }

3.The schema for the logs data 日志数据

    "gender": "M or F",

   "properties": {

    "employer": "String",

   }

PUT /shakespeare

    "memory": INT,

    "speech_number": {"type": "integer"}

        }

          "properties": {

    "speaker": {"type": "keyword"},

}

COPY AS CURLVIEW IN CONSOLE 

    "geo.coordinates": "geo_point"

    "log": {

}

{

链接如下https://www.elastic.co/guide/en/kibana/6.1/tutorial-load-dataset.html

      }

PUT /logstash-2015.05.19

{

  "mappings": {

            "coordinates": {

账户信息这样字段映射。。。

      }

windows下的curl命令可不能否 到https://curl.haxx.se/download.html#Win64下载,解压后设置环境变量即可

}

        }

    "address": "String",

亲戚亲戚大伙儿儿会依次导入如下 三块数据 

    "state": "String"

    "line_id": INT,

    "lastname": "String",

  "doc": {

Use the following commands to establish geo_point mapping for the logs:

      "properties": {

    "age": INT,

}

      "properties": {

    "line_number": "String",

      }

    "firstname": "String",

        "geo": {

{

          }

      "properties": {

现在批量导入

2.The accounts data  账户数据特性

            "coordinates": {

{

    "line_id": {"type": "integer"},

 }

            }

将会你当前位置是D盘~这样哪些文件位置就要插进D盘下,有刚刚读只有

  }

Use the following command in a terminal (eg bash) to set up a mapping for the Shakespeare data set:

              "type": "geo_point"

  }

以下是莎士比亚的字段映射 可不能否 用postman将会curl等发出请求~完整版的url应该是localhost:950/shakespear

    }

curl -H 'Content-Type: application/x-ndjson' -XPOST 'localhost:950/bank/account/_bulk?pretty' --data-binary @accounts.json

}

    "city": "String",

    "log": {

    "@timestamp": "date"

{

            "coordinates": {

    "balance": INT,

    "email": "String",

          "properties": {

    "play_name": "String",

        "geo": {

    "account_number": INT,

  "mappings": {

    "speaker": "String",

              "type": "geo_point"

curl -H 'Content-Type: application/x-ndjson' -XPOST 'localhost:950/_bulk?pretty' --data-binary @logs.jsonl

              "type": "geo_point"

        }

          }

  }

PUT /logstash-2015.05.20

还有有些~~~windows下要把命令行中的单引号加带双引号,,。。。有刚刚会报

            }

1.The Shakespeare data 莎士比亚文集的数据特性

现在按照官方例子刚开始英文英文批量给elasticsearch导入数据