指令:

curl 172.17.1.15:9200/_bulk?pretty --data-binary @E:\Bin\Debug\testdata\437714060.json

 

json文件的内容定义

{"index":{"_index":"meterdata","_type":"autoData"}}
{"Mfid ":1,"TData":172170,"TMoney":209,"HTime":"2016-05-17T08:03:00"}
{"index":{"_index":"meterdata","_type":"autoData"}}
{"Mfid ":1,"TData":172170,"TMoney":209,"HTime":"2016-05-17T08:03:00"}

第一行指定index和type,并且要是单独一行,第二行指定json字符串的内容,最后要有新行单独换行,否则最后一条记录就插入失败

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-23
  • 2021-04-01
猜你喜欢
  • 2021-09-24
  • 2021-11-21
  • 2021-08-09
  • 2022-02-16
  • 2021-06-21
  • 2021-09-04
相关资源
相似解决方案