E
E
Elasticsearch 高手之路
Search…
E
E
Elasticsearch 高手之路
Introduction
First Chapter
1.ElasticSearch 5.x 安装
2.基础学前班
3.基础
3.1.配置文件
3.2.Mapping
3.3. Analysis(分析)
3.4. APIs
3.5.Query DSL(DSL方式查询)
3.6.Aggregations(聚合分析)
3.6.1.量度聚合(Metric Aggregations)
3.6.2.桶聚合(Bucket Aggregations)
3.6.3.管道聚合(Pipeline Aggregations)
3.6.4.矩阵聚合(Matrix Aggregations)
3.6.5.缓存频繁聚合(Caching heavy aggregations)
3.6.6.仅返回需要聚合的结果(Returning only aggregation results)
3.6.7.聚合元数据(Aggregation Metadata)
3.6.8.返回聚合的类型(Returning the type of the aggregation)
Glossary of terms (词汇表)
未完成的任务
4.基础补充总结
原理
实战
PHP API
资料
笔记
Powered By
GitBook
3.6.7.聚合元数据(Aggregation Metadata)
您可以将一条元数据与请求时的各个聚合相关联,并一起返回。 考虑这个例子,我们想将颜色蓝色与我们的
terms
聚合相关联。
1
curl -XGET 'localhost:9200/twitter/tweet/_search?pretty' -H 'Content-Type: application/json' -d'
2
{
3
"size": 0,
4
"aggs": {
5
"titles": {
6
"terms": {
7
"field": "title"
8
},
9
"meta": {
10
"color": "blue"
11
}
12
}
13
}
14
}
15
'
Copied!
那么这个元数据将被返回到我们的标题术语聚合
1
{
2
"aggregations": {
3
"titles": {
4
"meta": {
5
"color" : "blue"
6
},
7
"doc_count_error_upper_bound" : 0,
8
"sum_other_doc_count" : 0,
9
"buckets": [
10
]
11
}
12
},
13
...
14
}
Copied!
Previous
3.6.6.仅返回需要聚合的结果(Returning only aggregation results)
Next
3.6.8.返回聚合的类型(Returning the type of the aggregation)
Last modified
2yr ago
Copy link