美文网首页
007 PipeLine Agg

007 PipeLine Agg

作者: zhu733756 | 来源:发表于2020-03-18 20:07 被阅读0次

    # PipeLine Agg

    # 第一类,sibling  结果和现有的分析结果同级

    # max,min, avg & sum bucket;stats bucket; percentiles bucket

    # 第二类,parent,结果内嵌到现有的聚合分析之中

    # derivative 求导; Cumultive Sum累计求和;Moving Function滑动窗口

    POST kibana_sample_data_flights/_search

    {

      "size": 0,

      "aggs": {

        "Dests": {

          "terms": {

            "field": "Dest",

            "size": 10

          },

          "aggs": {

            "avg_AvgTicketPrice": {

              "avg": {

                "field": "AvgTicketPrice"

              }

            }

          }

        },

        "stats_by_dest": {

        "stats_bucket": {

          "buckets_path": "Dests.avg_AvgTicketPrice"

        }

        }

      }

    }

    POST  kibana_sample_data_flights/_search

    {

      "size": 0,

      "aggs": {

        "DistanceMiles": {

          "histogram": {

            "field": "DistanceMiles",

            "interval": 200,

            "min_doc_count": 100

          },

          "aggs": {

            "avg_AvgTicketPrice": {

              "avg": {

                "field": "AvgTicketPrice"

              }

            },

            "derivative_avg_AvgTicketPrice":{

              "derivative": {

                "buckets_path": "avg_AvgTicketPrice"

              }

            }

          }

        }

      }

    }

    相关文章

      网友评论

          本文标题:007 PipeLine Agg

          本文链接:https://www.haomeiwen.com/subject/soncyhtx.html