# What can be the query for this statement in Elasticsearch DSL

**URL:** <https://discuss.elastic.co/t/what-can-be-the-query-for-this-statement-in-elasticsearch-dsl/320275>\
**Category:** Elasticsearch\
**Created:** [December 1, 2022, 5:00pm UTC](https://discuss.elastic.co/t/what-can-be-the-query-for-this-statement-in-elasticsearch-dsl/320275 "2022-12-01T17:00:41Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Aniket\_Pant](https://avatars.discourse-cdn.com/v4/letter/a/77aa72/32.png) [@Aniket\_Pant](https://discuss.elastic.co/u/Aniket_Pant)\
**Post date:** [December 1, 2022, 5:00pm UTC](https://discuss.elastic.co/t/what-can-be-the-query-for-this-statement-in-elasticsearch-dsl/320275/1 "2022-12-01T17:00:41Z")

</div>

I am trying to have this query in elasticsearch  
statement: (ip=xx.xx.xx.xx and status="running") or (ip=xx.xx.xx.xx and status="running")  
can anyone tell me how can i write this in elasticsearch.

---

<div class="post-metadata">

**Author:** ![aaron-nimocks](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aaron-nimocks/32/73965_2.png) [@aaron-nimocks](https://discuss.elastic.co/u/aaron-nimocks)\
**Post date:** [December 1, 2022, 5:48pm UTC](https://discuss.elastic.co/t/what-can-be-the-query-for-this-statement-in-elasticsearch-dsl/320275/2 "2022-12-01T17:48:37Z")

</div>

Your **or** statements match. Is that a typo?

(ip=xx.xx.xx.xx and status="running") or (ip=xx.xx.xx.xx and status="running")

---

<div class="post-metadata">

**Author:** ![elasticforme](https://avatars.discourse-cdn.com/v4/letter/e/f05b48/32.png) [@elasticforme](https://discuss.elastic.co/u/elasticforme)\
**Post date:** [December 1, 2022, 5:51pm UTC](https://discuss.elastic.co/t/what-can-be-the-query-for-this-statement-in-elasticsearch-dsl/320275/3 "2022-12-01T17:51:41Z")

</div>

Aniket,  
post what you have done so far and someone might be able to tell you how to write it.

---

<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 29, 2022, 5:52pm UTC](https://discuss.elastic.co/t/what-can-be-the-query-for-this-statement-in-elasticsearch-dsl/320275/4 "2022-12-29T17:52:29Z")

</div>

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