![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
ElasticSearch
文章平均质量分 51
Rice_kil
这个作者很懒,什么都没留下…
展开
-
ES教程 -- ES命令 | ES JAVA API 学习记录(三)
SpringBoot ElasticSearch Starter API 1. pom <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-elasticsearch</artifactId> <version>2.3.7.RELEASE</...原创 2021-11-18 15:42:13 · 1736 阅读 · 0 评论 -
ES教程 -- ES命令 | ES JAVA API 学习记录(二)
4. 聚合查询 假设存在一个order索引,存储了每一笔布料销售订单,里面包含了布料颜色字段color 4.1根据color进行分组统计数量 GET /order/_search { "size" : 0, // 设置size=0的意思就是,仅返回聚合查询结果,不返回普通query查询结果。 "aggs" : { // 聚合查询语句的简写 "popular_colors" : { // 给聚合查询取个名字,叫popular_colors "t原创 2021-09-09 23:02:21 · 367 阅读 · 0 评论 -
ES教程 -- ES命令 | ES JAVA API 学习记录(一)
1. ES 基础常用命令 1. 获取某索引下数据 默认只展示10条 GET {indexName}/_search 2. 无条件 分页查询 es默认从0页开始 eg:获取第一页30条数据 GET {indexName}/_search { "from": 0, "size": 30 } 3. 条件查询 es字段类型可以进行设置 这里针对keyword 和text类型数据查询进行比较 查询关键字:term、match、match_phrase、query_string...原创 2021-09-08 19:54:03 · 489 阅读 · 0 评论