# Containing either

Learn how to check if a collection contains one or more elements.

This operator checks whether one collection contains at least one element from another. It is the opposite of the [`containing neither`](/reference/cql/expressions/events/criteria/operators/containing-neither) operator.

Note that the result is always false if the second collection is empty because the [empty set is disjoint from every set](https://en.wikipedia.org/wiki/Empty_set#properties).

Also, keep in mind that neither the order nor duplicate elements affect the result since collections are treated as [sets](/reference/cql/data-types/core/collection#set).

> **Multi-condition criteria**
>
> You can [combine conditions](/reference/cql/expressions/events/criteria/overview#multi-condition-criteria) to create more advanced criteria.

## Syntax

The basic syntax is:

```cql
with /*<property>*/ containing either /*<collection>*/
```

Alternatively, you can use the `including` keyword:

```cql
with /*<property>*/ including either /*<collection>*/
```

The negation of this operation can be expressed as:

```cql
with /*<property>*/ not containing either /*<collection>*/
```

Using the alternative syntax:

```cql
with /*<property>*/ not including either /*<collection>*/
```

## Parameters

These are the supported parameters:

- `name`: `collection`

  The name of the [event property](/reference/cql/expressions/events/event-types) to search for in the collection.

- `collection`: `collection`

  The collection to check.

## Examples

Check if a post with one of the specified tags was viewed:

```cql
user has viewed post with tags containing either ["news", "cases"]
```

To check the opposite:

```cql
user has viewed post with tags not containing either ["news", "cases"]
```
