# Puzzled with filters in routes.yaml

**URL:** <https://forum.ghost.org/t/puzzled-with-filters-in-routes-yaml/30124>\
**Category:** Routing\
**Created:** [May 14, 2022, 3:13pm UTC](https://forum.ghost.org/t/puzzled-with-filters-in-routes-yaml/30124 "2022-05-14T15:13:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![webshaped](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/webshaped/32/3641_2.png) [@webshaped](https://forum.ghost.org/u/webshaped)\
**Post date:** [May 14, 2022, 3:13pm UTC](https://forum.ghost.org/t/puzzled-with-filters-in-routes-yaml/30124/1 "2022-05-14T15:13:03Z")

</div>

Hi.  
In the Ghost tutorial [Creating content hubs with Ghost](https://ghost.org/docs/tutorials/building-a-content-hub/), there is a full guide of the parameters for the `filter` property and inside this guide, these two lines are puzzling me:

```auto
filter: tag:x,tag:y # can have either "x" or "y" tags (, = OR)

```

```auto
filter: tag:[x,y,z] # must have either "x", "y", or "z" tags ([] = IN)

```

For the life of me, I cannot fathom the difference between “can have either” and “must have either”. Furthermore, both filters are displaying a different set of posts when used in my channel definition in `routes.yaml`, but that’s for another forum topic, and maybe a pharmacy 😄  
Is there a kind soul out there that could help me understand the difference between those two filter options, OR and IN?

Cheers.

---

<div class="post-metadata">

**Author:** ![vikaspotluri123](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/vikaspotluri123/32/24_2.png) [@vikaspotluri123](https://forum.ghost.org/u/vikaspotluri123)\
**Post date:** [May 14, 2022, 4:54pm UTC](https://forum.ghost.org/t/puzzled-with-filters-in-routes-yaml/30124/2 "2022-05-14T16:54:17Z")

</div>

From the example, OR and IN should behave the same. The main difference is OR can be used for multiple things (e.g. `tag:x,author:jdoe`), while IN only operates on the one thing (e.g. only tags, or only authors).

You should be getting the same result set when using `tag:x,tag:y` and `tag:[x,y]` 🙂

---

<div class="post-metadata">

**Author:** ![webshaped](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/webshaped/32/3641_2.png) [@webshaped](https://forum.ghost.org/u/webshaped)\
**Post date:** [May 16, 2022, 6:16am UTC](https://forum.ghost.org/t/puzzled-with-filters-in-routes-yaml/30124/3 "2022-05-16T06:16:07Z")

</div>

Thank you for your time and effort @vikaspotluri123
