# Multi match query in a boolean query, filtered with aggregations

**URL:** <https://discuss.elastic.co/t/multi-match-query-in-a-boolean-query-filtered-with-aggregations/64137>\
**Category:** Elasticsearch\
**Created:** [October 27, 2016, 11:48am UTC](https://discuss.elastic.co/t/multi-match-query-in-a-boolean-query-filtered-with-aggregations/64137 "2016-10-27T11:48:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![isaacpm](https://avatars.discourse-cdn.com/v4/letter/i/b9e5f3/32.png) [@isaacpm](https://discuss.elastic.co/u/isaacpm)\
**Post date:** [October 27, 2016, 11:48am UTC](https://discuss.elastic.co/t/multi-match-query-in-a-boolean-query-filtered-with-aggregations/64137/1 "2016-10-27T11:48:46Z")

</div>

Hi,

we are testing the new elasticsearch 5 and almost none of the previous queries work ☹

How could I make this be a multi match instead of a match\_all:

{  
"query": {  
"bool": {  
"must": {  
"match\_all": {}  
},  
"filter": {  
"range": {  
"price": {"gte": 0, "lte": 2}  
}  
}  
}  
},  
"\_source": ["categories.raw"],  
"aggs": {  
"categories": {  
"terms": {"field": "categories.raw", "size": 1000}  
}  
}  
}

Tried to replace the match\_all with a multimatch one, but doesn't seem to work straight away.  
Any ideas?

Thanks,  
Isaac

---

<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:** [July 5, 2017, 10:09pm UTC](https://discuss.elastic.co/t/multi-match-query-in-a-boolean-query-filtered-with-aggregations/64137/2 "2017-07-05T22:09:06Z")

</div>


