# Elasticsearch bool query formation with multiple must clause

**URL:** https://discuss.elastic.co/t/elasticsearch-bool-query-formation-with-multiple-must-clause/97509
**Category:** Elasticsearch
**Created:** [August 18, 2017, 4:14am UTC](https://discuss.elastic.co/t/elasticsearch-bool-query-formation-with-multiple-must-clause/97509 "2017-08-18T04:14:20Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![Milind\_Karandikar](https://avatars.discourse-cdn.com/v4/letter/m/85f322/32.png) [@Milind\_Karandikar](https://discuss.elastic.co/u/Milind_Karandikar)
#### Post date: [August 18, 2017, 4:24am UTC](https://discuss.elastic.co/t/elasticsearch-bool-query-formation-with-multiple-must-clause/97509/2 "2017-08-18T04:24:01Z")

</div>

I am using cerebro as a UI to access elasticsearch cluster. When I tried executing the query from the rest client provided by cerebro, I observed that it gives me an error, stating that - Duplicate must clause. Is it that we can't have multiple must clauses? If not, there should be a way to handle query like SELECT \* FROM campaign WHERE id IN (1,2,3) AND name IN ('a', 'b', 'c'). Can someone help me out

---

_[View the full topic](https://discuss.elastic.co/t/elasticsearch-bool-query-formation-with-multiple-must-clause/97509)._
