elasticsearch单条及批量插入
首页->学习资料->微服务治理->elasticsearch
关键词: 发布时间:2020-04-05 06:03:51 浏览次数:1636
单条插入:
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":""}
赞:(0)
踩:(0)
- 相关文章
- elasticsearch插入时报错:invalid
- 无法访问虚拟机上的elasticsearch
- elasticsearch scroll方式查询时sc
- elasticsearch批量更新数据
- centos7.4下安装elasticsearch
- php中elasticsearch scroll方式查
- Elasticsearch 实时分布式搜索分析
- Elasticsearch 权威指南(中文版)
- elasticsearch查询实例-模拟数据
- elasticsearch-建立indice(相当于s
- 热门文章
- win7中将文件拷贝到虚拟机linux下
- phpexcel设置行高及列宽,背景颜色,
- rabbitmq无法启动
- intellij idea不显示git push按钮
- php7中使用mongodb的aggregate进行
- centos7.4 64位下swoole安装及配置
- laravel页面静态化的方法
- navicate连接mycat报1184错误
- 单点登录sso原理及php实现方式及de
- devops-jenkins容器为pending状态
- 好评文章
- phpexcel设置行高及列宽,背景颜色,
- php7中使用mongodb的aggregate进行
- intellij idea打开文件所在文件夹
- windows下使用MongoDB Compass Com
- win7中将文件拷贝到虚拟机linux下
- laravel 中悲观锁 & 乐观锁的使用
- 单点登录sso原理及php实现方式及de
- navicate连接mycat报1184错误
- rabbitmq无法启动
- laravel整合dingo/api方法步骤:jwt
- 我的项目
- 【github】www.github.com/hurong241
- 【码云】gitee.com/hu_rong/projects
- 【docker hub】hub.docker.com/repositories/hurong241
- 【packagist】packagist.org/users/hurong241/packages
- 站点信息
- 建站时间:2011年
- 文章数:607篇
- 浏览数:940273