elasticsearch REST API方式批量插入数据

elasticsearch REST API方式批量插入数据

1:ES的服务地址  http://127.0.0.1:9600/_bulk

2:请求的数据体,注意数据的最后一行记得加换行

{ "create": { "_index": "traffic_test", "_type": "traffic_test"} }
{"name": "song40","age":33}
{ "create": { "_index": "traffic_test", "_type": "traffic_test"} }
{"name": "song40","age":33}
{ "create": { "_index": "traffic_test", "_type": "traffic_test"} }
{"name": "song40","age":33}
{ "create": { "_index": "traffic_test", "_type": "traffic_test"} }
{"name": "song40","age":33}

上一篇:洛谷P1021邮票面值设计


下一篇:数据库DBUtils基本使用