Skip to content

Pipeline aggregation doesn't deduplicate underlying aggs #26611

@honzakral

Description

@honzakral

Kibana version: 6.5.1

Steps to reproduce:

  1. Define two pipeline aggregations as metrics on the same underlying bucketing aggregation
  2. Kibana will ask both aggs to be calculated

Expected behavior: Kibana should deduplicate the same underlying aggregation and only run them once.

Screenshots (if relevant):
screenshot from 2018-12-04 10-11-30

Imagine asking for both avg and max buckets, underlying request then looks like:

{
  "aggs": {
    "1": {
      "max_bucket": {
        "buckets_path": "1-bucket>_count"
      }
    },
    "2": {
      "avg_bucket": {
        "buckets_path": "2-bucket>_count"
      }
    },
    "1-bucket": {
      "date_histogram": {
        "field": "Date",
        "interval": "1M",
        "time_zone": "Europe/Berlin",
        "min_doc_count": 1
      }
    },
    "2-bucket": {
      "date_histogram": {
        "field": "Date",
        "interval": "1M",
        "time_zone": "Europe/Berlin",
        "min_doc_count": 1
      }
    }
  },
  "size": 0,
  "_source": {
    "excludes": []
  },
  "stored_fields": [
    "*"
  ],
  "script_fields": {},
  "docvalue_fields": [
    {
      "field": "Date",
      "format": "date_time"
    }
  ],
  "query": {
    "bool": {
      "must": [],
      "filter": [
        {
          "match_all": {}
        }
      ],
      "should": [],
      "must_not": []
    }
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Feature:AggregationsAggregation infrastructure (AggConfig, esaggs, ...)Feature:SearchQuerying infrastructure in KibanaenhancementNew value added to drive a business resultimpact:lowAddressing this issue will have a low level of impact on the quality/strength of our product.loe:smallSmall Level of Effort

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions