# Does Pipeline aggregation have path length limitation?

**URL:** https://discuss.elastic.co/t/does-pipeline-aggregation-have-path-length-limitation/110026
**Category:** Elasticsearch
**Created:** [December 3, 2017, 12:15am UTC](https://discuss.elastic.co/t/does-pipeline-aggregation-have-path-length-limitation/110026 "2017-12-03T00:15:17Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![hym](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hym/32/22399_2.png) [@hym](https://discuss.elastic.co/u/hym)
#### Post date: [December 3, 2017, 12:15am UTC](https://discuss.elastic.co/t/does-pipeline-aggregation-have-path-length-limitation/110026/1 "2017-12-03T00:15:17Z")

</div>

Hi,

I am using pipeline aggregation for let's say getting the average of my result buckets in the following example:

```
"aggs": {
    "ag-histo": {
      "date_histogram": {
        "field": "date",
        "interval": "day"
      },
      "aggs": {
        "ag-sum": {
          "sum": {
            "field": "value"
          }
        }
      }
    },
    "buc-avg":{
      "avg_bucket": {
        "buckets_path": "ag-histo>ag-sum"
      }
    }
  }

```

and it works fine.

But when I add one more aggregation in between ag-histo and ag-sum and make path longer always I get the following error:  
"buckets\_path must reference either a number value or a single value numeric metric aggregation, got: java.lang.Object[]"

but I provide a single value numeric metric aggregation (sum). Is that the matter of length of path or?

Not working example: (adding a term aggregation between ag-histo and ag-sum):

"aggs": {  
"ag-histo": {  
"date\_histogram": {  
"field": "date",  
"interval": "day"  
},  
"aggs": {  
"ag-term": {  
"terms": {  
"field": "type.keyword",  
"size": 10  
},  
"aggs": {  
"ag-sum": {  
"sum": {  
"field": "value"  
}  
}  
}  
}  
}  
},  
"buc-avg":{  
"avg\_bucket": {  
"buckets\_path": "ag-histo\>ag-term\>ag-sum"  
}  
}  
}

Thanks in advance

---

<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: [December 31, 2017, 12:15am UTC](https://discuss.elastic.co/t/does-pipeline-aggregation-have-path-length-limitation/110026/2 "2017-12-31T00:15:28Z")

</div>

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