1. Aggregation Metadata(聚合元数据)

原文链接 : https://www.elastic.co/guide/en/elasticsearch/reference/5.4/agg-metadata.html

译文链接 : Aggregation Metadata(聚合元数据)

贡献者 : 程威ApacheCNApache中文网

您可以将一条元数据与请求时的各个聚合相关联,并一起返回。 考虑这个例子,我们想将颜色蓝色与我们的 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": [
            ]
        }
    },
    ...
}
Copyright © Kilvn 2021. all right reserved,powered by Gitbook最后更新时间: 2021-06-08 20:22:42

results matching ""

    No results matching ""