# Aggregator \[load\_time\_outlier\] of type \[percentiles\] cannot accept sub-aggregations

**URL:** <https://discuss.elastic.co/t/aggregator-load-time-outlier-of-type-percentiles-cannot-accept-sub-aggregations/241981>\
**Category:** Elasticsearch\
**Created:** [July 21, 2020, 8:08am UTC](https://discuss.elastic.co/t/aggregator-load-time-outlier-of-type-percentiles-cannot-accept-sub-aggregations/241981 "2020-07-21T08:08:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![shwesinhan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shwesinhan/32/78663_2.png) [@shwesinhan](https://discuss.elastic.co/u/shwesinhan)\
**Post date:** [July 21, 2020, 8:08am UTC](https://discuss.elastic.co/t/aggregator-load-time-outlier-of-type-percentiles-cannot-accept-sub-aggregations/241981/1 "2020-07-21T08:08:45Z")

</div>

i use percentiles aggregation for the response times low25% mid50% top25% partitions and then want to get min/max values based on each aggregated partitions. i try to write query like

```auto
GET myindex-2020.06/_search
{
  "size": 0,
    "aggs": {
        "MY_FILTER" : {
            "filter" : {
              "bool": {
                "must": [
                  {
                    "term": { "project_type.raw": "PROJECT1"}
                  },
                  {
                    "term": { "log_type.raw": "RESPONSE"}
                  }
                ]
              }
            },
        "aggs": {
        "daily": {
          "date_histogram": {
            "field": "@timestamp",
            "interval": "1d"
          },
          "aggs": {
            "load_time_outlier": {
              "percentiles": {
                "field": "elapsed_time",
                "percents": [1, 25, 75]
              },
              
              "aggs" : {
                "min_value" : { 
                  "min" : { "field" : "load_time_outlier" } 
                }
              }
            }
          }
        }
      } 
    }
  }
}

```

but i got error response msg

```auto
    {
      "error": {
        "root_cause": [
          {
            "type": "aggregation_initialization_exception",
            "reason": "Aggregator [load_time_outlier] of type [percentiles] cannot accept sub-aggregations"
          }
        ],
        "type": "aggregation_initialization_exception",
        "reason": "Aggregator [load_time_outlier] of type [percentiles] cannot accept sub-aggregations"
      },
      "status": 500
    }

```

is percentiles not possible to sub-aggregations? or is my query something wrong?  
please help 🙏

---

<div class="post-metadata">

**Author:** ![Ignacio\_Vera](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ignacio_vera/32/36674_2.png) [@Ignacio\_Vera](https://discuss.elastic.co/u/Ignacio_Vera)\
**Post date:** [July 21, 2020, 10:15am UTC](https://discuss.elastic.co/t/aggregator-load-time-outlier-of-type-percentiles-cannot-accept-sub-aggregations/241981/2 "2020-07-21T10:15:48Z")

</div>

Percentiles aggregation is a metric aggregation and therefore it does not support sub-aggregations.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [August 18, 2020, 10:16am UTC](https://discuss.elastic.co/t/aggregator-load-time-outlier-of-type-percentiles-cannot-accept-sub-aggregations/241981/3 "2020-08-18T10:16:01Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
