Back to Elasticsearch

Comparison operators [promql-comparison-operators]

docs/reference/query-languages/promql/operators/comparison.md

9.5.0647 B
Original Source

Comparison operators [promql-comparison-operators]

These binary operators compare scalars and instant vectors. By default they act as filters; with the bool modifier they return 0 or 1.

In {{es}}, a comparison is evaluated only at the top level of an expression and only with a scalar literal on the right-hand side. Comparisons between two instant vectors, and nested comparisons, return a client error (4xx). See PromQL limitations.

:::{include} ../_snippets/generated/x-pack-esql/operators/lists/comparison.md :::