# Can I do an OR logic Filter?

**URL:** https://discuss.elastic.co/t/can-i-do-an-or-logic-filter/257395
**Category:** Elasticsearch
**Created:** [December 2, 2020, 5:03pm UTC](https://discuss.elastic.co/t/can-i-do-an-or-logic-filter/257395 "2020-12-02T17:03:49Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![spyderman4g63](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spyderman4g63/32/64172_2.png) [@spyderman4g63](https://discuss.elastic.co/u/spyderman4g63)
#### Post date: [December 2, 2020, 5:03pm UTC](https://discuss.elastic.co/t/can-i-do-an-or-logic-filter/257395/1 "2020-12-02T17:03:49Z")

</div>

I'm trying to build an OR logic facet (aggregation). From what I understand the best way to filter a query for an aggregation value is to use the `filter` clause. That is because a filter limits the results without having an effect on relevancy scoring. However, it seems like the filter acts as a `must` match. I'd like the use the filter as a `should` I believe. Is this possible?

---

<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 30, 2020, 5:03pm UTC](https://discuss.elastic.co/t/can-i-do-an-or-logic-filter/257395/2 "2020-12-30T17:03:56Z")

</div>

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