比如我们现在有这样一个文件,data.json:

{ "index" : { "_index" : "test", "_type" : "type1", "_id" : "1" } }
{ "field1" : "value1" }

它的第一行定义了_index,_type,_id等信息;第二行定义了字段的信息。

然后执行命令:

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

相关文章:

  • 2021-09-06
  • 2021-12-04
  • 2022-01-29
  • 2021-08-30
  • 2022-12-23
  • 2022-12-23
  • 2021-09-04
  • 2022-12-23
猜你喜欢
  • 2021-06-26
  • 2022-12-23
  • 2021-05-30
  • 2022-03-05
  • 2022-12-23
相关资源
相似解决方案