# How we can use Must Clause(for searching data) in Elastic.Clients.Elasticsearch library

**URL:** <https://discuss.elastic.co/t/how-we-can-use-must-clause-for-searching-data-in-elastic-clients-elasticsearch-library/347636>\
**Category:** Elasticsearch\
**Tags:** language-clients\
**Created:** [November 21, 2023, 12:59pm UTC](https://discuss.elastic.co/t/how-we-can-use-must-clause-for-searching-data-in-elastic-clients-elasticsearch-library/347636 "2023-11-21T12:59:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jahanzaib](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jahanzaib/32/122308_2.png) [@Jahanzaib](https://discuss.elastic.co/u/Jahanzaib)\
**Post date:** [November 21, 2023, 12:59pm UTC](https://discuss.elastic.co/t/how-we-can-use-must-clause-for-searching-data-in-elastic-clients-elasticsearch-library/347636/1 "2023-11-21T12:59:13Z")

</div>

![image](https://us1.discourse-cdn.com/elastic/original/3X/4/a/4a2864ab6b30530b6aa402ed42764ec71c4a49da.png)  
Hi Everyone,  
I am new here and i do not know to ask a question. I am using Elastic.Clients.Elasticsearch library not Nest. i have issue so i want to discuss with you. In this snipped i made three queries and they are working but i want that when i send empty EventIDs then the data should be showed on patidenid and practiceid. but here when i send empty EventIDs then not data get show because it does match empty query to elasticsearch and i have to do this with must clause not should or anything else. How can i achieve it please give me answer. I searched alot on internet but nothing happend. Thank you very much

---

<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:** [December 19, 2023, 12:59pm UTC](https://discuss.elastic.co/t/how-we-can-use-must-clause-for-searching-data-in-elastic-clients-elasticsearch-library/347636/2 "2023-12-19T12:59:34Z")

</div>

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