单条插入:post https://es地址/student/_create/你的id
{
"id": "0",
"tel": "13533590000",
"name": "插入一条数据",
"sex": "0",
"city_id": "0",
"city_name": "北京",
"location": {"lat":39.986114,"lon":116.387046},
"create_time": "2019-12-31 09:08:56",
"address": "中国北京市天坛公园"
}
批量插入:注意最后一行要敲两次回车post https://es地址/student/_bulk
{"create":{"_index":"student"}}
{"id":"1","tel":"13533592801","name":"张三丰","sex":"1","city_id":"1","city_name":"深圳市","location":{"lat":22.719571,"lon":114.364493},"create_time":"2020-04-04 15:57:20","address":"广东省深圳市龙岗区坪山站"}
{"create":{"_index":"student"}}
{"id":"2","tel":"13533592802","name":"张三花","sex":"2","city_id":"1","city_name":"深圳市","location":{"lat":22.632069,"lon":114.062088},"create_time":"2020-04-04 15:58:52","address":"广东省深圳市龙岗区坂田站"}
{"create":{"_index":"student"}}
{"id":"3","tel":"13533592803","name":"张三","sex":"1","city_id":"2","city_name":"广州市","location":{"lat":23.265706,"lon":113.261805},"create_time":"2020-04-04 16:03:12","address":"广东省广州市天河客运站"}
{"create":{"_index":"student"}}
{"id":"4","tel":"13533592804","name":"李四四","sex":"1","city_id":"4","city_name":"中山市","location":{"lat":22.522077,"lon":113.408984},"create_time":"2020-04-04 16:23:22","address":"广东省中山市客运站"}
{"create":{"_index":"student"}}
{"id":"5","tel":"13533592805","name":"李诗四","sex":"2","city_id":"3","city_name":"东莞市","location":{"lat":23.025384,"lon":113.747034},"create_time":"2020-04-04 16:35:38","address":"广东省东莞市棠涌客运站"}
{"create":{"_index":"student"}}
{"id":"6","tel":"","name":"空数据","sex":"0","city_id":"0","city_name":"","location":{"lat":0,"lon":0},"create_time":"2020-03-04","address":""}