# Kibana aggregation filter query issue

**URL:** https://discuss.elastic.co/t/kibana-aggregation-filter-query-issue/118161
**Category:** Kibana
**Created:** [February 2, 2018, 6:37am UTC](https://discuss.elastic.co/t/kibana-aggregation-filter-query-issue/118161 "2018-02-02T06:37:19Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![shahrukhkhan](https://avatars.discourse-cdn.com/v4/letter/s/d07c76/32.png) [@shahrukhkhan](https://discuss.elastic.co/u/shahrukhkhan)
#### Post date: [February 2, 2018, 6:37am UTC](https://discuss.elastic.co/t/kibana-aggregation-filter-query-issue/118161/1 "2018-02-02T06:37:20Z")

</div>

So i want to enquire about composite query in kibana filter aggregation. i am using kibana 5.4.3.  
I applied one filter like,  
method.raw:"methodName"  
now two method names are same but are from different class. So i'd like to apply a composite filter like,  
method.raw:"methodName" and class.raw:"ClassName"

Currently i can't figure out a way to provide such a composite query in filters. Could you help me with that?

---

<div class="post-metadata">

### Author: ![shaunak](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shaunak/32/6643_2.png) [@shaunak](https://discuss.elastic.co/u/shaunak)
#### Post date: [February 2, 2018, 8:48pm UTC](https://discuss.elastic.co/t/kibana-aggregation-filter-query-issue/118161/2 "2018-02-02T20:48:08Z")

</div>

You are nearly there! This should work (note the capitalization):

`method.raw:"methodName" AND class.raw:"ClassName"`

In general, you can use either [Lucene Query Syntax](https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-query-string-query.html#query-string-syntax) or [Elasticsearch Query DSL](https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl.html) for the filter expression.

Here's an example showing the use of Lucene Query Syntax in the filter expressions:

 ![22%20PM](https://us1.discourse-cdn.com/elastic/original/3X/f/b/fba0d8d6c6b1b25ad45d814def13f5764d542b53.png)

And here's the same example but constructed using Elasticsearch Query DSL in the filter expressions:

 ![52%20PM](https://us1.discourse-cdn.com/elastic/original/3X/9/0/90e2023004cba7964202a7c75a2671445d113c66.png)

Hope that helps,

Shaunak

---

<div class="post-metadata">

### Author: ![shahrukhkhan](https://avatars.discourse-cdn.com/v4/letter/s/d07c76/32.png) [@shahrukhkhan](https://discuss.elastic.co/u/shahrukhkhan)
#### Post date: [February 5, 2018, 10:52am UTC](https://discuss.elastic.co/t/kibana-aggregation-filter-query-issue/118161/3 "2018-02-05T10:52:38Z")

</div>

That worked perfectly.🙂  
Didn't realise i was this close! 😅  
Anyway, thank you so much for the 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: [March 5, 2018, 10:53am UTC](https://discuss.elastic.co/t/kibana-aggregation-filter-query-issue/118161/4 "2018-03-05T10:53:14Z")

</div>

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