> ## Documentation Index
> Fetch the complete documentation index at: https://upstash.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# $in

The `$in` operator matches documents where the field value equals any one of the specified values.
This is useful when you want to filter by multiple acceptable values without writing separate conditions.

The operator takes an array of values and returns documents where the field matches at least one value in the array.
This is equivalent to combining multiple `$eq` conditions with a logical OR.

### Compatibility

| Field Type  | Supported |
| ----------- | --------- |
| TEXT        | Yes       |
| U64/I64/F64 | Yes       |
| DATE        | Yes       |
| BOOL        | Yes       |
| KEYWORD     | Yes       |
| FACET       | Yes       |

### Examples

<Tabs>
  <Tab title="TypeScript">
    ```ts theme={"system"}
    // Match any of several categories
    await products.query({
      filter: {
        category: {
          $in: ["electronics", "accessories", "audio"],
        },
      },
    });
    ```
  </Tab>

  <Tab title="Python">
    ```python theme={"system"}
    # Match any of several categories
    products.query(filter={"category": {"$in": ["electronics", "accessories", "audio"]}})
    ```
  </Tab>

  <Tab title="Redis CLI">
    ```bash theme={"system"}
    # Match any of several categories
    SEARCH.QUERY products '{"category": {"$in": ["electronics", "accessories", "audio"]}}'
    ```
  </Tab>
</Tabs>
