elasticsearch 查询语法
来源:互联网 发布:浙江省儿童dna数据库 编辑:程序博客网 时间:2024/04/30 20:40
查询节点
GET /_cat/nodes?v
查询所有索引
GET /_cat/indices?v
创建索引
PUT /test_index?pretty
test_index是索引名
查询索引结构
GET /test_index
查询指定索引指定表的记录
GET /test_index/table1/_search{ "query": { "match_all":{} }}
用简单的查询可以这样
GET /test_index/_search?q=*
GET /test_index/_search?q=name:jane
创建mapping(定义表结构)
PUT /test_index/_mapping/table1 { "properties": { "sex":{ "type":"integer" }, "is_enable": { "type":"boolean" } }}
插入/更新记录
POST /test_index/table1/1 { "id":1, "name":"张四", "descriptions":"就是那个传说中的张四", "age":80, "nickname":"张小四", "books":{ "name":"张小四自传", "price":55555 } }
其中:
test_index:索引名
table1:表名
1:id
指定id删除记录
DELETE /test_index/table1/1
批量删除
POST /test_index/table1/_bulk{"delete":{"_id":"1"}}
清空table1表的记录
POST /test_index/table1/_delete_by_query?conflicts=proceed{ "query": { "match_all": {} }}
更新数据,只对指定的字段更新
POST /test_index/table1/2/_update{ "doc": { "name": "Jane Doe" }}
阅读全文
0 0
- ElasticSearch 查询语法
- elasticsearch 时间查询语法
- Elasticsearch query_string语法查询
- elasticsearch-常用查询语法
- elasticsearch-查询语法验证
- ElasticSearch 基本查询语法
- ElasticSearch 基本查询语法
- elasticsearch 查询语法
- [Elasticsearch]查询语法速查
- (八)ElasticSearch常用查询语法
- (九)ElasticSearch高级查询语法
- 使用SQL语法来查询Elasticsearch:Elasticsearch-SQL
- 使用SQL语法来查询Elasticsearch:Elasticsearch-SQL
- ElasticSearch语法
- elasticsearch-查询
- Elasticsearch查询
- Elasticsearch查询
- ElasticSearch查询
- SQL数据分析概览——Hive、Impala、Spark SQL、Drill、HAWQ 以及Presto+druid
- 安卓智能地图开发与实施二十五:Shapefile文件的可视化与编辑
- 封装导航栏及返回,获取控件所在控制器 iOS
- 【转载】清华人都如此努力,那我们呢?
- Android系统权限
- elasticsearch 查询语法
- JavaScript 对象的属性类型
- Oracle 13c OEM 安装测试(13.2.0.0)
- IntelliJ IDEA2017.3 激活
- MongoDB和MySQL的区别
- 史上最简单的SpringCloud教程 | 第六篇: 分布式配置中心(Spring Cloud Config)
- 公司通过微信风控系统实时监控员工微信聊天记录
- java.lang.IllegalStateException: Cannot call sendError() after the response has been committed
- View的滑动冲突