🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
# Aggregation Metadata(聚合元数据) 您可以将一条元数据与请求时的各个聚合相关联,并一起返回。 考虑这个例子,我们想将颜色蓝色与我们的 **terms **聚合相关联。 | `curl -XGET ``'localhost:9200/twitter/tweet/_search?pretty'` `-H ``'Content-Type: application/json'` `-d'` `{` `"size"``: ``0``,` `"aggs"``: {` `"titles"``: {` `"terms"``: {` `"field"``: ``"title"` `},` `"meta"``: {` `"color"``: ``"blue"` `}` `}` `}` `}` `'` | 那么这个元数据将被返回到我们的标题术语聚合 | `{` `"aggregations"``: {` `"titles"``: {` `"meta"``: {` `"color"` `: ``"blue"` `},` `"doc_count_error_upper_bound"` `: ``0``,` `"sum_other_doc_count"` `: ``0``,` `"buckets"``: [` `]` `}` `},` `...` `}` |