# Query with bool must and with dis\_max

**URL:** <https://discuss.elastic.co/t/query-with-bool-must-and-with-dis-max/146679>\
**Category:** Elasticsearch\
**Created:** [August 30, 2018, 10:32am UTC](https://discuss.elastic.co/t/query-with-bool-must-and-with-dis-max/146679 "2018-08-30T10:32:24Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![c44](https://avatars.discourse-cdn.com/v4/letter/c/4491bb/32.png) [@c44](https://discuss.elastic.co/u/c44)\
**Post date:** [August 30, 2018, 10:32am UTC](https://discuss.elastic.co/t/query-with-bool-must-and-with-dis-max/146679/1 "2018-08-30T10:32:24Z")

</div>

Hello!  
I need query with must match and with dis\_max.  
I have:  
1)  
'body' =\> [  
'query' =\> [  
'dis\_max' =\> [  
'queries' =\> [  
['match\_phrase\_prefix' =\> ['description' =\> 'user'] ]  
]  
]  
]  
]

1. 

'query' =\> [  
'bool' =\> [  
'must' =\> [  
['match' =\> ['type' =\> 'admin'] ]  
]  
]  
]  
How can I get trought it?

Resolved  
'should' before dis\_max resolved problem

---

<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 27, 2018, 10:32am UTC](https://discuss.elastic.co/t/query-with-bool-must-and-with-dis-max/146679/2 "2018-09-27T10:32:26Z")

</div>

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