你的浏览器禁用了JavaScript, 请开启后刷新浏览器获得更好的体验!
输入关键字进行搜索
搜索:
没有找到相关结果
laoyang360 - 《一本书讲透Elasticsearch》作者,Elastic认证工程师 [死磕Elasitcsearch]知识星球地址:http://t.cn/RmwM3N9;微信公众号:铭毅天下; 博客:https://elastic.blog.csdn.net
赞同来自:
PUT my_index_009 { "mappings": { "properties": { "name": { "type": "text", "fields": { "keyword": { "type": "keyword" } } }, "publish_time": { "type": "date" } } } } POST my_index09/_bulk {"index":{"_id":1}} {"name":"张三","publish_time":"2020-05-01" } {"index":{"_id":2}} {"name":"李四","publish_time":"2020-05-02" } {"index":{"_id":3}} {"name":"王五","publish_time":"2020-05-03" } {"index":{"_id":4}} {"name":"张三","publish_time":"2015-05-02" } {"index":{"_id":5}} {"name":"张三","publish_time":"2015-05-03" } {"index":{"_id":6}} {"name":"李四","publish_time":"2015-05-04" } {"index":{"_id":7}} {"name":"王五","publish_time":"2015-05-05" } {"index":{"_id":8}} {"name":"张三","publish_time":"2015-05-04" } POST my_index09/_search { "size": 0, "aggs": { "name_aggs": { "terms": { "field": "name.keyword", "shard_size":10, "size": 2 }, "aggs": { "date_aggs": { "value_count": { "field": "publish_time" } } } } } }
要回复问题请先登录或注册
1 个回复
laoyang360 - 《一本书讲透Elasticsearch》作者,Elastic认证工程师 [死磕Elasitcsearch]知识星球地址:http://t.cn/RmwM3N9;微信公众号:铭毅天下; 博客:https://elastic.blog.csdn.net
赞同来自: