From ec375e2e157538f2bf00dce521e16773f36e5dc2 Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Sun, 16 Jul 2023 23:37:01 -0700 Subject: [PATCH] docs/keyConcepts.md: clarify that the number of `,`-delimited filters per each `or` group can be arbitrary Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/3997 --- docs/keyConcepts.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/docs/keyConcepts.md b/docs/keyConcepts.md index 5f0a6a002b..b6fca058a9 100644 --- a/docs/keyConcepts.md +++ b/docs/keyConcepts.md @@ -829,8 +829,11 @@ either `{job="app1",env="prod"}` or `{job="app2",env="dev"}` labels: {job="app1",env="prod" or job="app2",env="dev"} ``` -The number of `or` filters can be arbitrary. This functionality allows passing the selected series -to [rollup functions](https://docs.victoriametrics.com/MetricsQL.html#rollup-functions) such as [rate()](https://docs.victoriametrics.com/MetricsQL.html#rate) +The number of `or` groups can be arbitrary. The number of `,`-delimited label filters per each `or` group can be arbitrary. +Per-group filters are applied with `and` operation, e.g. they select series simultaneously matching all the filters in the group. + +This functionality allows passing the selected series to [rollup functions](https://docs.victoriametrics.com/MetricsQL.html#rollup-functions) +such as [rate()](https://docs.victoriametrics.com/MetricsQL.html#rate) without the need to use [subqueries](https://docs.victoriametrics.com/MetricsQL.html#subqueries): ```metricsql