# Nested Objects aggregations

**URL:** <https://discuss.elastic.co/t/nested-objects-aggregations/124957>\
**Category:** Kibana\
**Created:** [March 21, 2018, 10:02am UTC](https://discuss.elastic.co/t/nested-objects-aggregations/124957 "2018-03-21T10:02:18Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![yzaretskyy](https://avatars.discourse-cdn.com/v4/letter/y/8e8cbc/32.png) [@yzaretskyy](https://discuss.elastic.co/u/yzaretskyy)\
**Post date:** [March 21, 2018, 10:02am UTC](https://discuss.elastic.co/t/nested-objects-aggregations/124957/1 "2018-03-21T10:02:18Z")

</div>

Hi all,

I'm looking for ability of using nested fields in aggregations, but Kibana does not support it. Is there are some natural way to add some interceptor or so, to be able to modify/build JSON before sending request to ES?  
Here is the JSON that Kibana generates:

```
{
  ...
  "aggs": {
    "1": {
      "sum": {
        "field": "person.parents.age"
      }
    }
  },
  ...
}

```

and here is what it should look like to be successfully processed on ES:

```
{
  ...
  "aggs": {
    "1": {
      "nested":{
        "path":"person.parents"
       },
      "aggs": {
        "2": {
        "sum": {
          "field": "person.parents.age"
          }
        }
      }
    }
  },
  ...
}
```

---

<div class="post-metadata">

**Author:** ![timroes](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/timroes/32/19712_2.png) [@timroes](https://discuss.elastic.co/u/timroes)\
**Post date:** [March 21, 2018, 10:34am UTC](https://discuss.elastic.co/t/nested-objects-aggregations/124957/2 "2018-03-21T10:34:17Z")

</div>

Hi,

we are currently still working on nested field support. You can follow [#1084](https://github.com/elastic/kibana/issues/1084) for updates on nested field support.

Also there is a [KibanaNestedSupportPlugin](https://github.com/ppadovani/KibanaNestedSupportPlugin/) which you could use to enable nested field supports for your Kibana. If you are interested in seeing how to implement that yourself, the sources of this plugin would be the best way to start.

Cheers,  
Tim

---

<div class="post-metadata">

**Author:** ![yzaretskyy](https://avatars.discourse-cdn.com/v4/letter/y/8e8cbc/32.png) [@yzaretskyy](https://discuss.elastic.co/u/yzaretskyy)\
**Post date:** [March 21, 2018, 10:50am UTC](https://discuss.elastic.co/t/nested-objects-aggregations/124957/3 "2018-03-21T10:50:10Z")

</div>

Thanks for quick response

---

<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:** [April 18, 2018, 10:50am UTC](https://discuss.elastic.co/t/nested-objects-aggregations/124957/4 "2018-04-18T10:50:24Z")

</div>

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