# Composite aggregations Issue

**URL:** https://discuss.elastic.co/t/composite-aggregations-issue/145944
**Category:** Elasticsearch
**Created:** [August 24, 2018, 4:35pm UTC](https://discuss.elastic.co/t/composite-aggregations-issue/145944 "2018-08-24T16:35:55Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![sivap](https://avatars.discourse-cdn.com/v4/letter/s/bc8723/32.png) [@sivap](https://discuss.elastic.co/u/sivap)
#### Post date: [August 24, 2018, 4:35pm UTC](https://discuss.elastic.co/t/composite-aggregations-issue/145944/1 "2018-08-24T16:35:56Z")

</div>

Hi Team,  
I have used exclude condition in the terms aggregation and then trying to use the composite aggregation buckets to build the combinations of the values. But am getting exceptions ( "type": "parsing\_exception").😩

Query as below,  
GET my\_index-\*/\_search  
{  
"aggs" : {  
"abc": { "terms": {"field": "st\_no.keyword" } },  
"alert" : { "terms" : { "field" : "filename.keyword", "exclude" : ["abcd", "efgh"] }},  
"status": { "terms": { "field": "status.keyword", "exclude" : ["closed", "removed"] } },  
"costars": {  
"composite" : {  
"sources" : [  
{ "abc": { "terms": {"field": "st\_no.keyword" } } },  
{ "alert": { "terms": { "field": "filename.keyword" } } },  
{ "status": { "terms": { "field": "status.keyword" } } }   
]  
}  
}   
}

Could someone please help me to achieve this and correct me if am doing anything wrong!

Thanks  
Siva.P

---

<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: [September 21, 2018, 4:35pm UTC](https://discuss.elastic.co/t/composite-aggregations-issue/145944/2 "2018-09-21T16:35:56Z")

</div>

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