# Can I create a query with multiple filter?

**URL:** <https://discuss.elastic.co/t/can-i-create-a-query-with-multiple-filter/285452>\
**Category:** Elasticsearch\
**Created:** [September 29, 2021, 9:02am UTC](https://discuss.elastic.co/t/can-i-create-a-query-with-multiple-filter/285452 "2021-09-29T09:02:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![psyapathy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/psyapathy/32/50265_2.png) [@psyapathy](https://discuss.elastic.co/u/psyapathy)\
**Post date:** [September 29, 2021, 9:02am UTC](https://discuss.elastic.co/t/can-i-create-a-query-with-multiple-filter/285452/1 "2021-09-29T09:02:44Z")

</div>

Hi all!

Can I create a query with multiple filter?

In my documents i have 2 fields: switch-host and port

I want get result with multiple filter. Like:

1. switch-host = host1 and ports = port1,port2,port3
2. switch-host = host8 and ports = port56,port32, port14

Can i do this?

Help me please

Thank you advance!

---

<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:** [October 27, 2021, 9:03am UTC](https://discuss.elastic.co/t/can-i-create-a-query-with-multiple-filter/285452/2 "2021-10-27T09:03:12Z")

</div>

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