# BoolQuery and should

**URL:** <https://discuss.elastic.co/t/boolquery-and-should/68189>\
**Category:** Elasticsearch\
**Created:** [December 6, 2016, 3:38pm UTC](https://discuss.elastic.co/t/boolquery-and-should/68189 "2016-12-06T15:38:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![minniek](https://avatars.discourse-cdn.com/v4/letter/m/aeb1de/32.png) [@minniek](https://discuss.elastic.co/u/minniek)\
**Post date:** [December 6, 2016, 3:38pm UTC](https://discuss.elastic.co/t/boolquery-and-should/68189/1 "2016-12-06T15:38:16Z")

</div>

## Hello, I am looking to integrate two should in a query. For example, I have this query and I would like to have another should filter: " **should**": [{ "match": { "message": "OK" }}, { "match": { "message": "FINE" }}], "minimum\_should\_match" : 1

CODE that I have implemented:

GET /my\_index/my\_type/\_search  
{  
"query": {  
"bool": {  
"must": { "match": { "how": "quick" }},  
" **should**": [  
{ "match": { "title": "brown" }},  
{ "match": { "title": "dog" }}  
],  
"minimum\_should\_match" : 1  
}  
}  
}

Both "should" have two match at least one, It is something similar to OR in relational databases: SELECT .... where (message ='OK' or message='FINE') and (title = "brown" or title = "brown") and how = "quick"

How can I do that? thanks

---

<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:** [January 3, 2017, 3:38pm UTC](https://discuss.elastic.co/t/boolquery-and-should/68189/2 "2017-01-03T15:38:20Z")

</div>

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