﻿---
title: Logical/set operators
description: PromQL logical/set operators in Elasticsearch.
url: https://docs-v3-preview.elastic.dev/elastic/elasticsearch/tree/main/reference/query-languages/promql/operators/logical-set
products:
  - Elasticsearch
applies_to:
  - Elastic Cloud Serverless: Generally available
  - Elastic Stack: Preview in 9.4
---

# Logical/set operators
These binary operators combine two instant vectors by matching their label sets. In Elasticsearch, only `or` (union) is evaluated; the `and` and `unless` operators are not supported yet (see [Not yet supported](/elastic/elasticsearch/tree/main/reference/query-languages/promql/operators#promql-operators-not-supported) and [PromQL limitations](/elastic/elasticsearch/tree/main/reference/query-languages/promql/promql-limitations#promql-limitations-unsupported-constructs)).

## `or`

<applies-to>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**
Elasticsearch evaluates `or` only at the top level of an expression, and a top-level `or` chain supports at most 8 operands. A nested `or`, or a chain of more than 8 operands, returns a client error (4xx). See [Unsupported PromQL constructs](/elastic/elasticsearch/tree/main/reference/query-languages/promql/promql-limitations#promql-limitations-unsupported-constructs).