﻿---
title: Logical/set operators
description: PromQL logical/set operators in Elasticsearch.
url: https://www.elastic.co/elastic/docs-builder/docs/4641/reference/query-languages/promql/operators/logical-set
products:
  - Elasticsearch
applies_to:
  - Elastic Cloud Serverless: Generally available
  - Elastic Stack: Generally available since 9.5, Preview in 9.4
---

# Logical/set operators
These binary operators combine two instant vectors by matching their label sets. For the set operators that Elasticsearch supports, and their restrictions, refer to [Not supported yet](/elastic/docs-builder/docs/4641/reference/query-languages/promql/operators#promql-operators-not-supported) and [Prometheus compatibility](/elastic/docs-builder/docs/4641/reference/query-languages/promql/prometheus-compatibility#prometheus-compatibility-logical-set-binary-operators).

## `or`

<applies-to>Elastic Stack: Generally available since 9.5, Elastic Stack: Preview in 9.4</applies-to>
Returns all elements from the left vector plus elements from the right vector that have no matching label sets in the left.
An `or` chain takes at most 8 operands by default. <applies-to>Elastic Stack: Planned</applies-to> <applies-to>Elastic Cloud Serverless: Generally available</applies-to> Change the limit with the `esql.query.max_branch_count_per_merge` cluster setting.
**Operands**
<definitions>
  <definition term="lhs, rhs (instant_vector)">
    The two instant vectors to combine by matching label sets.
  </definition>
</definitions>

**Returns**
An `instant_vector`.
**Example**
```
vector1 or vector2
```

<note>
  **Differences from Prometheus**`on(...)` or `ignoring(...)`, such as `a or on(job) b`, and `or` inside another expression, such as `(sum(a) or sum(b)) * 2` or `count(a or b)`, aren't supported yet. Refer to [Prometheus compatibility](/elastic/docs-builder/docs/4641/reference/query-languages/promql/prometheus-compatibility#prometheus-compatibility-logical-set-binary-operators).
</note>