﻿---
title: Logical/set operators
description: PromQL logical/set operators in Elasticsearch.
url: https://www.elastic.co/elastic/docs-builder/docs/4302/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, see [Not yet supported](/elastic/docs-builder/docs/4302/reference/query-languages/promql/operators#promql-operators-not-supported) and [PromQL limitations](/elastic/docs-builder/docs/4302/reference/query-languages/promql/promql-limitations#promql-limitations-unsupported-constructs).

## `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.
**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
```

**Differences from Prometheus**
For the restrictions on `or` in Elasticsearch, see [Unsupported PromQL constructs](/elastic/docs-builder/docs/4302/reference/query-languages/promql/promql-limitations#promql-limitations-unsupported-constructs).