From 82b4e5af4e08c726a452718f25d70009b88e46d6 Mon Sep 17 00:00:00 2001 From: "David W. Dougherty" Date: Fri, 27 Mar 2026 10:02:15 -0700 Subject: [PATCH 1/4] DEV: (cmds) update TS cmd pages for multiple aggregators support --- content/commands/ts.mrange.md | 65 ++--------- content/commands/ts.mrevrange.md | 70 +++--------- content/commands/ts.range.md | 68 +++-------- content/commands/ts.revrange.md | 82 +++++--------- .../develop/data-types/timeseries/_index.md | 8 +- static/images/railroad/ts.mrange.svg | 103 ++++++++--------- static/images/railroad/ts.mrevrange.svg | 107 ++++++++---------- static/images/railroad/ts.range.svg | 43 +++---- static/images/railroad/ts.revrange.svg | 51 ++++----- 9 files changed, 209 insertions(+), 388 deletions(-) diff --git a/content/commands/ts.mrange.md b/content/commands/ts.mrange.md index b016ad17a2..de03abe306 100644 --- a/content/commands/ts.mrange.md +++ b/content/commands/ts.mrange.md @@ -53,50 +53,9 @@ arguments: optional: true token: ALIGN type: integer - - arguments: - - name: avg - token: AVG - type: pure-token - - name: first - token: FIRST - type: pure-token - - name: last - token: LAST - type: pure-token - - name: min - token: MIN - type: pure-token - - name: max - token: MAX - type: pure-token - - name: sum - token: SUM - type: pure-token - - name: range - token: RANGE - type: pure-token - - name: count - token: COUNT - type: pure-token - - name: std.p - token: STD.P - type: pure-token - - name: std.s - token: STD.S - type: pure-token - - name: var.p - token: VAR.P - type: pure-token - - name: var.s - token: VAR.S - type: pure-token - - name: twa - since: 1.8.0 - token: TWA - type: pure-token - name: aggregator + - name: aggregationType token: AGGREGATION - type: oneof + type: string - name: bucketDuration type: integer - name: buckettimestamp @@ -165,15 +124,14 @@ stack_path: docs/data-types/timeseries summary: Query a range across multiple time series by filters in forward direction syntax: "TS.MRANGE fromTimestamp toTimestamp\n [LATEST]\n [FILTER_BY_TS ts...]\n\ \ [FILTER_BY_VALUE min max]\n [WITHLABELS | ]\n [COUNT\ - \ count]\n [[ALIGN align] AGGREGATION aggregator bucketDuration [BUCKETTIMESTAMP\ + \ count]\n [[ALIGN align] AGGREGATION aggregationType[,aggregationType ...] bucketDuration [BUCKETTIMESTAMP\ \ bt] [EMPTY]]\n FILTER filterExpr...\n [GROUPBY label REDUCE reducer]\n" syntax_fmt: "TS.MRANGE fromTimestamp toTimestamp [LATEST] [FILTER_BY_TS\_Timestamp\n\ \ [Timestamp ...]] [FILTER_BY_VALUE min max] [WITHLABELS |\n SELECTED_LABELS label1\ - \ [label1 ...]] [COUNT\_count] [[ALIGN\_value]\n AGGREGATION\_ bucketDuration\n\ - \ [BUCKETTIMESTAMP] [EMPTY]] FILTER\_\ - \ [GROUPBY label REDUCE\n reducer]" + \ [label1 ...]] [COUNT\_count] [[ALIGN\_value]\n AGGREGATION\ aggregationType[,aggregationType ...] bucketDuration\ + \ [BUCKETTIMESTAMP]\n [EMPTY]] FILTER\_\ + \ [GROUPBY label REDUCE reducer]" title: TS.MRANGE --- {{< note >}} @@ -288,13 +246,13 @@ Values include:
-AGGREGATION aggregator bucketDuration +AGGREGATION aggregationType[,aggregationType ...] bucketDuration per time series, aggregates samples into time buckets, where: - - `aggregator` takes one of the following aggregation types: + - `aggregationType` takes one or more of the following aggregation types: - | `aggregator` | Description | + | `aggregationType` | Description | | ------------ | --------------------------------------------------------------- | | `avg` | Arithmetic mean of all non-NaN values | | `sum` | Sum of all non-NaN values | @@ -338,7 +296,7 @@ controls how bucket timestamps are reported. is a flag, which, when specified, reports aggregations also for empty buckets. -| `aggregator` | Value reported for each empty bucket | +| `aggregationType` | Value reported for each empty bucket | | -------------------- | ------------------------------------ | | `sum`, `count` | `0` | | `last` | The value of the last sample before the bucket's start. `NaN` when no such sample. | @@ -354,6 +312,7 @@ Regardless of the values of `fromTimestamp` and `toTimestamp`, no data is report splits time series into groups, each group contains time series that share the same value for the provided label name, then aggregates results in each group. When combined with `AGGREGATION` the `GROUPBY`/`REDUCE` is applied post aggregation stage. +`GROUPBY`/`REDUCE` is not permitted when multiple aggregators are specified. - `label` is label name. A group is created for all time series that share the same value for this label. diff --git a/content/commands/ts.mrevrange.md b/content/commands/ts.mrevrange.md index 55f5fca968..8990f0ea19 100644 --- a/content/commands/ts.mrevrange.md +++ b/content/commands/ts.mrevrange.md @@ -8,10 +8,11 @@ arguments: type: string - name: toTimestamp type: string -- name: LATEST +- name: latest optional: true since: 1.8.0 - type: string + token: LATEST + type: pure-token - multiple: true name: Timestamp optional: true @@ -53,50 +54,9 @@ arguments: optional: true token: ALIGN type: integer - - arguments: - - name: avg - token: AVG - type: pure-token - - name: first - token: FIRST - type: pure-token - - name: last - token: LAST - type: pure-token - - name: min - token: MIN - type: pure-token - - name: max - token: MAX - type: pure-token - - name: sum - token: SUM - type: pure-token - - name: range - token: RANGE - type: pure-token - - name: count - token: COUNT - type: pure-token - - name: std.p - token: STD.P - type: pure-token - - name: std.s - token: STD.S - type: pure-token - - name: var.p - token: VAR.P - type: pure-token - - name: var.s - token: VAR.S - type: pure-token - - name: twa - since: 1.8.0 - token: TWA - type: pure-token - name: aggregator + - name: aggregationType token: AGGREGATION - type: oneof + type: string - name: bucketDuration type: integer - name: buckettimestamp @@ -165,15 +125,14 @@ stack_path: docs/data-types/timeseries summary: Query a range across multiple time-series by filters in reverse direction syntax: "TS.MREVRANGE fromTimestamp toTimestamp\n [LATEST]\n [FILTER_BY_TS ts...]\n\ \ [FILTER_BY_VALUE min max]\n [WITHLABELS | ]\n [COUNT\ - \ count]\n [[ALIGN align] AGGREGATION aggregator bucketDuration [BUCKETTIMESTAMP\ + \ count]\n [[ALIGN align] AGGREGATION aggregationType[,aggregationType ...] bucketDuration [BUCKETTIMESTAMP\ \ bt] [EMPTY]]\n FILTER filterExpr...\n [GROUPBY label REDUCE reducer]\n" syntax_fmt: "TS.MREVRANGE fromTimestamp toTimestamp [LATEST]\n [FILTER_BY_TS\_Timestamp\ \ [Timestamp ...]] [FILTER_BY_VALUE min max]\n [WITHLABELS | SELECTED_LABELS label1\ - \ [label1 ...]] [COUNT\_count]\n [[ALIGN\_value] AGGREGATION\_\n\ - \ bucketDuration [BUCKETTIMESTAMP] [EMPTY]] FILTER\_ [GROUPBY label REDUCE\n reducer]" + \ [label1 ...]] [COUNT\_count]\n [[ALIGN\_value] AGGREGATION\ aggregationType[,aggregationType ...] bucketDuration\n\ + \ [BUCKETTIMESTAMP] [EMPTY]] FILTER\_\ + \ [GROUPBY label REDUCE\n reducer]" title: TS.MREVRANGE --- {{< note >}} @@ -288,13 +247,13 @@ Values include:
-AGGREGATION aggregator bucketDuration +AGGREGATION aggregationType[,aggregationType ...] bucketDuration per time series, aggregates samples into time buckets, where: - - `aggregator` takes one of the following aggregation types: + - `aggregationType` takes one or more of the following aggregation types: - | `aggregator` | Description | + | `aggregationType` | Description | | ------------ | --------------------------------------------------------------- | | `avg` | Arithmetic mean of all non-NaN values | | `sum` | Sum of all non-NaN values | @@ -338,7 +297,7 @@ controls how bucket timestamps are reported. is a flag, which, when specified, reports aggregations also for empty buckets. -| `aggregator` | Value reported for each empty bucket | +| `aggregationType` | Value reported for each empty bucket | | -------------------- | ------------------------------------ | | `sum`, `count` | `0` | | `last` | The value of the last sample before the bucket's start. `NaN` when no such sample. | @@ -354,6 +313,7 @@ Regardless of the values of `fromTimestamp` and `toTimestamp`, no data is report splits time series into groups, each group contains time series that share the same value for the provided label name, then aggregates results in each group. When combined with `AGGREGATION` the `GROUPBY`/`REDUCE` is applied post aggregation stage. +`GROUPBY`/`REDUCE` is not permitted when multiple aggregators are specified. - `label` is label name. A group is created for all time series that share the same value for this label. diff --git a/content/commands/ts.range.md b/content/commands/ts.range.md index 398a9ed1bc..e2a8683f56 100644 --- a/content/commands/ts.range.md +++ b/content/commands/ts.range.md @@ -39,50 +39,9 @@ arguments: optional: true token: ALIGN type: integer - - arguments: - - name: avg - token: AVG - type: pure-token - - name: first - token: FIRST - type: pure-token - - name: last - token: LAST - type: pure-token - - name: min - token: MIN - type: pure-token - - name: max - token: MAX - type: pure-token - - name: sum - token: SUM - type: pure-token - - name: range - token: RANGE - type: pure-token - - name: count - token: COUNT - type: pure-token - - name: std.p - token: STD.P - type: pure-token - - name: std.s - token: STD.S - type: pure-token - - name: var.p - token: VAR.P - type: pure-token - - name: var.s - token: VAR.S - type: pure-token - - name: twa - since: 1.8.0 - token: TWA - type: pure-token - name: aggregator + - name: aggregationType token: AGGREGATION - type: oneof + type: string - name: bucketDuration type: integer - name: buckettimestamp @@ -120,12 +79,11 @@ since: 1.0.0 stack_path: docs/data-types/timeseries summary: Query a range in forward direction syntax: "TS.RANGE key fromTimestamp toTimestamp\n [LATEST]\n [FILTER_BY_TS ts...]\n\ - \ [FILTER_BY_VALUE min max]\n [COUNT count] \n [[ALIGN align] AGGREGATION aggregator\ + \ [FILTER_BY_VALUE min max]\n [COUNT count] \n [[ALIGN align] AGGREGATION aggregationType[,aggregationType ...]\ \ bucketDuration [BUCKETTIMESTAMP bt] [EMPTY]]\n" syntax_fmt: "TS.RANGE key fromTimestamp toTimestamp [LATEST]\n [FILTER_BY_TS\_Timestamp\ \ [Timestamp ...]] [FILTER_BY_VALUE min max]\n [COUNT\_count] [[ALIGN\_value] AGGREGATION\_\ - \n bucketDuration [BUCKETTIMESTAMP] [EMPTY]]" + aggregationType[,aggregationType ...]\n bucketDuration [BUCKETTIMESTAMP] [EMPTY]]" title: TS.RANGE --- @@ -204,13 +162,13 @@ is a time bucket alignment control for `AGGREGATION`. It controls the time bucke
-AGGREGATION aggregator bucketDuration +AGGREGATION aggregationType[,aggregationType ...] bucketDuration -aggregates samples into time buckets, where: +per time series, aggregates samples into time buckets, where: - - `aggregator` takes one of the following aggregation types: + - `aggregationType` takes one or more of the following aggregation types: - | `aggregator` | Description | + | `aggregationType` | Description | | ------------ | --------------------------------------------------------------- | | `avg` | Arithmetic mean of all non-NaN values | | `sum` | Sum of all non-NaN values | @@ -254,7 +212,7 @@ controls how bucket timestamps are reported. is a flag, which, when specified, reports aggregations also for empty buckets. -| `aggregator` | Value reported for each empty bucket | +| `aggregationType` | Value reported for each empty bucket | | -------------------- | ------------------------------------ | | `sum`, `count` | `0` | | `last` | The value of the last sample before the bucket's start. `NaN` when no such sample. | @@ -297,12 +255,14 @@ TS.RANGE temp:TLV - + FILTER_BY_VALUE -100 100 2) 40 {{< / highlight >}} -Now, retrieve the average value, while ignoring out-of-range values. +Now, retrieve the minimum, average, and maximum values, while ignoring out-of-range values. {{< highlight bash >}} -TS.RANGE temp:TLV - + FILTER_BY_VALUE -100 100 AGGREGATION avg 1000 +TS.RANGE temp:TLV - + FILTER_BY_VALUE -100 100 AGGREGATION min,avg,max 1000 1) 1) (integer) 1000 - 2) 35 + 2) 30 + 3) 35 + 4) 40 {{< / highlight >}}
diff --git a/content/commands/ts.revrange.md b/content/commands/ts.revrange.md index 450f590d8c..dd4686a7a8 100644 --- a/content/commands/ts.revrange.md +++ b/content/commands/ts.revrange.md @@ -39,57 +39,35 @@ arguments: optional: true token: ALIGN type: integer + - name: aggregationType + token: AGGREGATION + type: string + - name: bucketDuration + type: integer - arguments: - - name: avg - token: AVG - type: pure-token - - name: first - token: FIRST - type: pure-token - - name: last - token: LAST - type: pure-token - - name: min - token: MIN - type: pure-token - - name: max - token: MAX - type: pure-token - - name: sum - token: SUM - type: pure-token - - name: range - token: RANGE + - name: '-' + token: '-' type: pure-token - - name: count - token: COUNT + - name: start + token: start type: pure-token - - name: std.p - token: STD.P + - name: + + token: + type: pure-token - - name: std.s - token: STD.S + - name: end + token: end type: pure-token - - name: var.p - token: VAR.P + - name: '~' + token: '~' type: pure-token - - name: var.s - token: VAR.S + - name: mid + token: mid type: pure-token - - name: twa - since: 1.8.0 - token: TWA - type: pure-token - name: aggregator - token: AGGREGATION - type: oneof - - name: bucketDuration - type: integer - - name: buckettimestamp + name: buckettimestamp optional: true since: 1.8.0 token: BUCKETTIMESTAMP - type: pure-token + type: oneof - name: empty optional: true since: 1.8.0 @@ -120,12 +98,12 @@ since: 1.4.0 stack_path: docs/data-types/timeseries summary: Query a range in reverse direction syntax: "TS.REVRANGE key fromTimestamp toTimestamp\n [LATEST]\n [FILTER_BY_TS ts...]\n\ - \ [FILTER_BY_VALUE min max]\n [COUNT count]\n [[ALIGN align] AGGREGATION aggregator\ + \ [FILTER_BY_VALUE min max]\n [COUNT count]\n [[ALIGN align] AGGREGATION aggregationType[,aggregationType ...]\ \ bucketDuration [BUCKETTIMESTAMP bt] [EMPTY]]\n" syntax_fmt: "TS.REVRANGE key fromTimestamp toTimestamp [LATEST]\n [FILTER_BY_TS\_\ Timestamp [Timestamp ...]] [FILTER_BY_VALUE min max]\n [COUNT\_count] [[ALIGN\_\ - value] AGGREGATION\_\n bucketDuration [BUCKETTIMESTAMP] [EMPTY]]" + value] AGGREGATION\ aggregationType[,aggregationType ...]\n bucketDuration [BUCKETTIMESTAMP\_<- | start\ + \ | + | end | ~ | mid>]\n [EMPTY]]" title: TS.REVRANGE --- @@ -205,12 +183,12 @@ Values include:
-AGGREGATION aggregator bucketDuration +AGGREGATION aggregationType[,aggregationType ...] bucketDuration aggregates samples into time buckets, where: - - `aggregator` takes one of the following aggregation types: + - `aggregationType` takes one or more of the following aggregation types: - | `aggregator` | Description | + | `aggregationType` | Description | | ------------ | --------------------------------------------------------------- | | `avg` | Arithmetic mean of all non-NaN values | | `sum` | Sum of all non-NaN values | @@ -253,7 +231,7 @@ controls how bucket timestamps are reported. [EMPTY] (since RedisTimeSeries 1.8) is a flag, which, when specified, reports aggregations also for empty buckets. -| `aggregator` | Value reported for each empty bucket | +| `aggregationType` | Value reported for each empty bucket | | -------------------- | ------------------------------------ | | `sum`, `count` | `0` | | `last` | The value of the last sample before the bucket's start. `NaN` when no such sample. | @@ -297,12 +275,14 @@ TS.REVRANGE temp:TLV - + FILTER_BY_VALUE -100 100 2) 30 {{< / highlight >}} -Now, retrieve the average value, while ignoring out-of-range values. +Now, retrieve the minimum, average, and maximum values, while ignoring out-of-range values. {{< highlight bash >}} -TS.REVRANGE temp:TLV - + FILTER_BY_VALUE -100 100 AGGREGATION avg 1000 +TS.REVRANGE temp:TLV - + FILTER_BY_VALUE -100 100 AGGREGATION min,avg,max 1000 1) 1) (integer) 1000 - 2) 35 + 2) 30 + 3) 35 + 4) 40 {{< / highlight >}}
diff --git a/content/develop/data-types/timeseries/_index.md b/content/develop/data-types/timeseries/_index.md index c9117d1af8..83e7d2adb1 100644 --- a/content/develop/data-types/timeseries/_index.md +++ b/content/develop/data-types/timeseries/_index.md @@ -383,7 +383,7 @@ bucket by an aggregate value, such as the average or maximum value. For example, if you expect to collect more than one billion data points in a day, you could aggregate the data using buckets of one minute. Since each bucket is represented by a single value, this reduces the dataset size to 1,440 data points (24 hours x 60 minutes = 1,440 minutes). -The range query commands let you specify an aggregation function and bucket size. +The range query commands let you specify one or more aggregation function and bucket size. The available aggregation functions are: - `avg`: Arithmetic mean of all values @@ -418,6 +418,12 @@ aggregated values with only one value used to calculate the average for the last ``` {{< /clients-example >}} +To use multiple aggregators in a single query, separate the aggregators with comma characters as in the following example. + +```bash +TS.RANGE rg:2 - + AGGREGATION min,avg,max 2 +``` + NaN Handling (Redis 8.6+): Starting from Redis 8.6, all existing aggregation functions ignore NaN values when computing results. For example, if a bucket contains values [1.0, NaN, 3.0], the `avg` aggregator will return 2.0 (average of 1.0 and 3.0), and the `count` aggregator will return 2. Use the new `countNaN` and `countAll` aggregators to count NaN values and total values respectively. ### Bucket alignment diff --git a/static/images/railroad/ts.mrange.svg b/static/images/railroad/ts.mrange.svg index 8e422fa8c2..219407e414 100644 --- a/static/images/railroad/ts.mrange.svg +++ b/static/images/railroad/ts.mrange.svg @@ -1,4 +1,4 @@ - + - + TS.MRANGE fromTimestamp toTimestamp @@ -78,64 +78,51 @@ circle { fill: #DC382D !important; stroke: #DC382D !important; } COUNT count - - - + + + ALIGN value - -AGGREGATION - -AVG -FIRST -LAST -MIN -MAX -SUM -RANGE -COUNT -STD.P -STD.S -VAR.P -VAR.S -TWA -bucketDuration - - -BUCKETTIMESTAMP - - -EMPTY - - -FILTER - -l=v -l!=v -l= -l!= -l=(v1,v2,...) -l!=(v1,v2,...) - - - - -FILTER - -l=v -l!=v -l= -l!= -l=(v1,v2,...) -l!=(v1,v2,...) - - - - -GROUPBY -label -REDUCE -reducer \ No newline at end of file + +AGGREGATION +aggregationType +bucketDuration + + +BUCKETTIMESTAMP + + +EMPTY + + +FILTER + +l=v +l!=v +l= +l!= +l=(v1,v2,...) +l!=(v1,v2,...) + + + + +FILTER + +l=v +l!=v +l= +l!= +l=(v1,v2,...) +l!=(v1,v2,...) + + + + +GROUPBY +label +REDUCE +reducer \ No newline at end of file diff --git a/static/images/railroad/ts.mrevrange.svg b/static/images/railroad/ts.mrevrange.svg index c7aa3437a1..ce89cea3bc 100644 --- a/static/images/railroad/ts.mrevrange.svg +++ b/static/images/railroad/ts.mrevrange.svg @@ -1,4 +1,4 @@ - + - + TS.MREVRANGE fromTimestamp toTimestamp - -LATEST + +LATEST @@ -78,64 +78,51 @@ circle { fill: #DC382D !important; stroke: #DC382D !important; } COUNT count - - - + + + ALIGN value - -AGGREGATION - -AVG -FIRST -LAST -MIN -MAX -SUM -RANGE -COUNT -STD.P -STD.S -VAR.P -VAR.S -TWA -bucketDuration - - -BUCKETTIMESTAMP - - -EMPTY - - -FILTER - -l=v -l!=v -l= -l!= -l=(v1,v2,...) -l!=(v1,v2,...) - - - - -FILTER - -l=v -l!=v -l= -l!= -l=(v1,v2,...) -l!=(v1,v2,...) - - - - -GROUPBY -label -REDUCE -reducer \ No newline at end of file + +AGGREGATION +aggregationType +bucketDuration + + +BUCKETTIMESTAMP + + +EMPTY + + +FILTER + +l=v +l!=v +l= +l!= +l=(v1,v2,...) +l!=(v1,v2,...) + + + + +FILTER + +l=v +l!=v +l= +l!= +l=(v1,v2,...) +l!=(v1,v2,...) + + + + +GROUPBY +label +REDUCE +reducer \ No newline at end of file diff --git a/static/images/railroad/ts.range.svg b/static/images/railroad/ts.range.svg index 295c82a2aa..7e8ffcc971 100644 --- a/static/images/railroad/ts.range.svg +++ b/static/images/railroad/ts.range.svg @@ -1,4 +1,4 @@ - + - + TS.RANGE key fromTimestamp @@ -70,34 +70,21 @@ circle { fill: #DC382D !important; stroke: #DC382D !important; } COUNT count - - - + + + ALIGN value - -AGGREGATION - -AVG -FIRST -LAST -MIN -MAX -SUM -RANGE -COUNT -STD.P -STD.S -VAR.P -VAR.S -TWA -bucketDuration - - -BUCKETTIMESTAMP - - -EMPTY \ No newline at end of file + +AGGREGATION +aggregationType +bucketDuration + + +BUCKETTIMESTAMP + + +EMPTY \ No newline at end of file diff --git a/static/images/railroad/ts.revrange.svg b/static/images/railroad/ts.revrange.svg index 164c7297b9..83f1fdcc1b 100644 --- a/static/images/railroad/ts.revrange.svg +++ b/static/images/railroad/ts.revrange.svg @@ -1,4 +1,4 @@ - + - + TS.REVRANGE key fromTimestamp @@ -70,34 +70,29 @@ circle { fill: #DC382D !important; stroke: #DC382D !important; } COUNT count - - - + + + ALIGN value - -AGGREGATION - -AVG -FIRST -LAST -MIN -MAX -SUM -RANGE -COUNT -STD.P -STD.S -VAR.P -VAR.S -TWA -bucketDuration - - -BUCKETTIMESTAMP - - -EMPTY \ No newline at end of file + +AGGREGATION +aggregationType +bucketDuration + + + +BUCKETTIMESTAMP + +- +start ++ +end +~ +mid + + +EMPTY \ No newline at end of file From f930b62b91aaf21d81086502dce2537cde626f68 Mon Sep 17 00:00:00 2001 From: "David W. Dougherty" Date: Fri, 27 Mar 2026 14:11:33 -0700 Subject: [PATCH 2/4] Address Bugbot's concerns --- build/components/syntax.py | 2 +- content/commands/ts.mrevrange.md | 5 +- content/commands/ts.revrange.md | 27 +------ static/images/railroad/ts.mrange.svg | 96 ++++++++++++----------- static/images/railroad/ts.mrevrange.svg | 100 ++++++++++++------------ static/images/railroad/ts.range.svg | 36 +++++---- static/images/railroad/ts.revrange.svg | 44 +++++------ 7 files changed, 145 insertions(+), 165 deletions(-) diff --git a/build/components/syntax.py b/build/components/syntax.py index 0ab0e382bc..d5b295f56d 100644 --- a/build/components/syntax.py +++ b/build/components/syntax.py @@ -216,7 +216,7 @@ def to_railroad(self) -> 'railroad.Node': # Token + first arg + [additional args ...] token_part = railroad.Terminal(self._token) - component = railroad.Sequence(token_part, railroad.OneOrMore(arg_part)) + component = railroad.Sequence(token_part, railroad.OneOrMore(arg_part, railroad.Terminal(','))) else: # Multiple without token: arg [arg ...] component = railroad.OneOrMore(component) diff --git a/content/commands/ts.mrevrange.md b/content/commands/ts.mrevrange.md index 8990f0ea19..b57b84da2d 100644 --- a/content/commands/ts.mrevrange.md +++ b/content/commands/ts.mrevrange.md @@ -8,11 +8,10 @@ arguments: type: string - name: toTimestamp type: string -- name: latest +- name: LATEST optional: true since: 1.8.0 - token: LATEST - type: pure-token + type: string - multiple: true name: Timestamp optional: true diff --git a/content/commands/ts.revrange.md b/content/commands/ts.revrange.md index dd4686a7a8..1605bb46fe 100644 --- a/content/commands/ts.revrange.md +++ b/content/commands/ts.revrange.md @@ -44,30 +44,11 @@ arguments: type: string - name: bucketDuration type: integer - - arguments: - - name: '-' - token: '-' - type: pure-token - - name: start - token: start - type: pure-token - - name: + - token: + - type: pure-token - - name: end - token: end - type: pure-token - - name: '~' - token: '~' - type: pure-token - - name: mid - token: mid - type: pure-token - name: buckettimestamp + - name: buckettimestamp optional: true since: 1.8.0 token: BUCKETTIMESTAMP - type: oneof + type: pure-token - name: empty optional: true since: 1.8.0 @@ -102,8 +83,8 @@ syntax: "TS.REVRANGE key fromTimestamp toTimestamp\n [LATEST]\n [FILTER_BY_TS \ bucketDuration [BUCKETTIMESTAMP bt] [EMPTY]]\n" syntax_fmt: "TS.REVRANGE key fromTimestamp toTimestamp [LATEST]\n [FILTER_BY_TS\_\ Timestamp [Timestamp ...]] [FILTER_BY_VALUE min max]\n [COUNT\_count] [[ALIGN\_\ - value] AGGREGATION\ aggregationType[,aggregationType ...]\n bucketDuration [BUCKETTIMESTAMP\_<- | start\ - \ | + | end | ~ | mid>]\n [EMPTY]]" + value] AGGREGATION\_aggregationType[,aggregationType ...]\n bucketDuration [BUCKETTIMESTAMP]\ + \ [EMPTY]]" title: TS.REVRANGE --- diff --git a/static/images/railroad/ts.mrange.svg b/static/images/railroad/ts.mrange.svg index 219407e414..2c52d2e1a1 100644 --- a/static/images/railroad/ts.mrange.svg +++ b/static/images/railroad/ts.mrange.svg @@ -1,4 +1,4 @@ - + - + TS.MRANGE fromTimestamp toTimestamp @@ -56,8 +56,8 @@ circle { fill: #DC382D !important; stroke: #DC382D !important; } FILTER_BY_TS -Timestamp - +Timestamp +, @@ -78,51 +78,53 @@ circle { fill: #DC382D !important; stroke: #DC382D !important; } COUNT count - - - + + + ALIGN value - -AGGREGATION -aggregationType -bucketDuration - - -BUCKETTIMESTAMP - - -EMPTY - - -FILTER - -l=v -l!=v -l= -l!= -l=(v1,v2,...) -l!=(v1,v2,...) - - - - -FILTER - -l=v -l!=v -l= -l!= -l=(v1,v2,...) -l!=(v1,v2,...) - - - - -GROUPBY -label -REDUCE -reducer \ No newline at end of file + +AGGREGATION + +aggregationType +, +bucketDuration + + +BUCKETTIMESTAMP + + +EMPTY + + +FILTER + +l=v +l!=v +l= +l!= +l=(v1,v2,...) +l!=(v1,v2,...) + + + + +FILTER + +l=v +l!=v +l= +l!= +l=(v1,v2,...) +l!=(v1,v2,...) + + + + +GROUPBY +label +REDUCE +reducer \ No newline at end of file diff --git a/static/images/railroad/ts.mrevrange.svg b/static/images/railroad/ts.mrevrange.svg index ce89cea3bc..92f4d0aa96 100644 --- a/static/images/railroad/ts.mrevrange.svg +++ b/static/images/railroad/ts.mrevrange.svg @@ -1,4 +1,4 @@ - + - + TS.MREVRANGE fromTimestamp toTimestamp - -LATEST + +LATEST FILTER_BY_TS -Timestamp - +Timestamp +, @@ -78,51 +78,53 @@ circle { fill: #DC382D !important; stroke: #DC382D !important; } COUNT count - - - + + + ALIGN value - -AGGREGATION -aggregationType -bucketDuration - - -BUCKETTIMESTAMP - - -EMPTY - - -FILTER - -l=v -l!=v -l= -l!= -l=(v1,v2,...) -l!=(v1,v2,...) - - - - -FILTER - -l=v -l!=v -l= -l!= -l=(v1,v2,...) -l!=(v1,v2,...) - - - - -GROUPBY -label -REDUCE -reducer \ No newline at end of file + +AGGREGATION + +aggregationType +, +bucketDuration + + +BUCKETTIMESTAMP + + +EMPTY + + +FILTER + +l=v +l!=v +l= +l!= +l=(v1,v2,...) +l!=(v1,v2,...) + + + + +FILTER + +l=v +l!=v +l= +l!= +l=(v1,v2,...) +l!=(v1,v2,...) + + + + +GROUPBY +label +REDUCE +reducer \ No newline at end of file diff --git a/static/images/railroad/ts.range.svg b/static/images/railroad/ts.range.svg index 7e8ffcc971..52f327e0fb 100644 --- a/static/images/railroad/ts.range.svg +++ b/static/images/railroad/ts.range.svg @@ -1,4 +1,4 @@ - + - + TS.RANGE key fromTimestamp @@ -57,8 +57,8 @@ circle { fill: #DC382D !important; stroke: #DC382D !important; } FILTER_BY_TS -Timestamp - +Timestamp +, @@ -70,21 +70,23 @@ circle { fill: #DC382D !important; stroke: #DC382D !important; } COUNT count - - - + + + ALIGN value - -AGGREGATION -aggregationType -bucketDuration - - -BUCKETTIMESTAMP - - -EMPTY \ No newline at end of file + +AGGREGATION + +aggregationType +, +bucketDuration + + +BUCKETTIMESTAMP + + +EMPTY \ No newline at end of file diff --git a/static/images/railroad/ts.revrange.svg b/static/images/railroad/ts.revrange.svg index 83f1fdcc1b..c3a963cd85 100644 --- a/static/images/railroad/ts.revrange.svg +++ b/static/images/railroad/ts.revrange.svg @@ -1,4 +1,4 @@ - + - + TS.REVRANGE key fromTimestamp @@ -57,8 +57,8 @@ circle { fill: #DC382D !important; stroke: #DC382D !important; } FILTER_BY_TS -Timestamp - +Timestamp +, @@ -70,29 +70,23 @@ circle { fill: #DC382D !important; stroke: #DC382D !important; } COUNT count - - - + + + ALIGN value - -AGGREGATION -aggregationType -bucketDuration - - - -BUCKETTIMESTAMP - -- -start -+ -end -~ -mid - - -EMPTY \ No newline at end of file + +AGGREGATION + +aggregationType +, +bucketDuration + + +BUCKETTIMESTAMP + + +EMPTY \ No newline at end of file From 0f91ed00235db003a20e03b78f0bbc9f4f6ae0d9 Mon Sep 17 00:00:00 2001 From: "David W. Dougherty" Date: Fri, 27 Mar 2026 14:42:36 -0700 Subject: [PATCH 3/4] Address more of Bugbot's concerns --- build/components/syntax.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/components/syntax.py b/build/components/syntax.py index d5b295f56d..0ab0e382bc 100644 --- a/build/components/syntax.py +++ b/build/components/syntax.py @@ -216,7 +216,7 @@ def to_railroad(self) -> 'railroad.Node': # Token + first arg + [additional args ...] token_part = railroad.Terminal(self._token) - component = railroad.Sequence(token_part, railroad.OneOrMore(arg_part, railroad.Terminal(','))) + component = railroad.Sequence(token_part, railroad.OneOrMore(arg_part)) else: # Multiple without token: arg [arg ...] component = railroad.OneOrMore(component) From d6bdb30002c99599ef004c8d3fb8664c4fe2ec32 Mon Sep 17 00:00:00 2001 From: "David W. Dougherty" Date: Mon, 30 Mar 2026 09:33:04 -0700 Subject: [PATCH 4/4] Address Lior's comments --- content/commands/ts.mrange.md | 19 ++-- content/commands/ts.mrevrange.md | 21 ++-- content/commands/ts.range.md | 21 ++-- content/commands/ts.revrange.md | 24 +++-- .../develop/data-types/timeseries/_index.md | 2 +- static/images/railroad/ts.mrange.svg | 96 ++++++++--------- static/images/railroad/ts.mrevrange.svg | 100 +++++++++--------- static/images/railroad/ts.range.svg | 36 +++---- static/images/railroad/ts.revrange.svg | 44 ++++---- 9 files changed, 192 insertions(+), 171 deletions(-) diff --git a/content/commands/ts.mrange.md b/content/commands/ts.mrange.md index de03abe306..400ff9a386 100644 --- a/content/commands/ts.mrange.md +++ b/content/commands/ts.mrange.md @@ -124,11 +124,11 @@ stack_path: docs/data-types/timeseries summary: Query a range across multiple time series by filters in forward direction syntax: "TS.MRANGE fromTimestamp toTimestamp\n [LATEST]\n [FILTER_BY_TS ts...]\n\ \ [FILTER_BY_VALUE min max]\n [WITHLABELS | ]\n [COUNT\ - \ count]\n [[ALIGN align] AGGREGATION aggregationType[,aggregationType ...] bucketDuration [BUCKETTIMESTAMP\ + \ count]\n [[ALIGN align] AGGREGATION aggregators bucketDuration [BUCKETTIMESTAMP\ \ bt] [EMPTY]]\n FILTER filterExpr...\n [GROUPBY label REDUCE reducer]\n" syntax_fmt: "TS.MRANGE fromTimestamp toTimestamp [LATEST] [FILTER_BY_TS\_Timestamp\n\ \ [Timestamp ...]] [FILTER_BY_VALUE min max] [WITHLABELS |\n SELECTED_LABELS label1\ - \ [label1 ...]] [COUNT\_count] [[ALIGN\_value]\n AGGREGATION\ aggregationType[,aggregationType ...] bucketDuration\ + \ [label1 ...]] [COUNT\_count] [[ALIGN\_value]\n AGGREGATION\ aggregators bucketDuration\ \ [BUCKETTIMESTAMP]\n [EMPTY]] FILTER\_\ \ [GROUPBY label REDUCE reducer]" @@ -246,13 +246,13 @@ Values include:
-AGGREGATION aggregationType[,aggregationType ...] bucketDuration +AGGREGATION aggregators bucketDuration -per time series, aggregates samples into time buckets, where: +for each time series, aggregates samples into time buckets, where: - - `aggregationType` takes one or more of the following aggregation types: + - `aggregators` is one or more comma-separated aggregator from the following table: - | `aggregationType` | Description | + | aggregator | Description | | ------------ | --------------------------------------------------------------- | | `avg` | Arithmetic mean of all non-NaN values | | `sum` | Sum of all non-NaN values | @@ -271,6 +271,11 @@ per time series, aggregates samples into time buckets, where: | `twa` | Time-weighted average over the bucket's timeframe (ignores NaN values) (since RedisTimeSeries 1.8) | - `bucketDuration` is duration of each bucket, in milliseconds. + + Note: `aggregators` can either be a single aggregator or multiple aggregators separated by commas as shown below. + No whitespace is allowed between aggregators. + + AGGREGATION min,avg,max Without `ALIGN`, bucket start times are multiples of `bucketDuration`. @@ -296,7 +301,7 @@ controls how bucket timestamps are reported. is a flag, which, when specified, reports aggregations also for empty buckets. -| `aggregationType` | Value reported for each empty bucket | +| `aggregators` | Value reported for each empty bucket | | -------------------- | ------------------------------------ | | `sum`, `count` | `0` | | `last` | The value of the last sample before the bucket's start. `NaN` when no such sample. | diff --git a/content/commands/ts.mrevrange.md b/content/commands/ts.mrevrange.md index b57b84da2d..e5e434cf1a 100644 --- a/content/commands/ts.mrevrange.md +++ b/content/commands/ts.mrevrange.md @@ -53,7 +53,7 @@ arguments: optional: true token: ALIGN type: integer - - name: aggregationType + - name: aggregators token: AGGREGATION type: string - name: bucketDuration @@ -124,11 +124,11 @@ stack_path: docs/data-types/timeseries summary: Query a range across multiple time-series by filters in reverse direction syntax: "TS.MREVRANGE fromTimestamp toTimestamp\n [LATEST]\n [FILTER_BY_TS ts...]\n\ \ [FILTER_BY_VALUE min max]\n [WITHLABELS | ]\n [COUNT\ - \ count]\n [[ALIGN align] AGGREGATION aggregationType[,aggregationType ...] bucketDuration [BUCKETTIMESTAMP\ + \ count]\n [[ALIGN align] AGGREGATION aggregators bucketDuration [BUCKETTIMESTAMP\ \ bt] [EMPTY]]\n FILTER filterExpr...\n [GROUPBY label REDUCE reducer]\n" syntax_fmt: "TS.MREVRANGE fromTimestamp toTimestamp [LATEST]\n [FILTER_BY_TS\_Timestamp\ \ [Timestamp ...]] [FILTER_BY_VALUE min max]\n [WITHLABELS | SELECTED_LABELS label1\ - \ [label1 ...]] [COUNT\_count]\n [[ALIGN\_value] AGGREGATION\ aggregationType[,aggregationType ...] bucketDuration\n\ + \ [label1 ...]] [COUNT\_count]\n [[ALIGN\_value] AGGREGATION\ aggregators bucketDuration\n\ \ [BUCKETTIMESTAMP] [EMPTY]] FILTER\_\ \ [GROUPBY label REDUCE\n reducer]" @@ -246,13 +246,13 @@ Values include:
-AGGREGATION aggregationType[,aggregationType ...] bucketDuration +AGGREGATION aggregators bucketDuration -per time series, aggregates samples into time buckets, where: +for each time series, aggregates samples into time buckets, where: - - `aggregationType` takes one or more of the following aggregation types: + - `aggregators` is one or more comma-separated aggregator from the following table: - | `aggregationType` | Description | + | aggregator | Description | | ------------ | --------------------------------------------------------------- | | `avg` | Arithmetic mean of all non-NaN values | | `sum` | Sum of all non-NaN values | @@ -271,6 +271,11 @@ per time series, aggregates samples into time buckets, where: | `twa` | Time-weighted average over the bucket's timeframe (ignores NaN values) (since RedisTimeSeries 1.8) | - `bucketDuration` is duration of each bucket, in milliseconds. + + Note: `aggregators` can either be a single aggregator or multiple aggregators separated by commas as shown below. + No whitespace is allowed between aggregators. + + AGGREGATION min,avg,max Without `ALIGN`, bucket start times are multiples of `bucketDuration`. @@ -296,7 +301,7 @@ controls how bucket timestamps are reported. is a flag, which, when specified, reports aggregations also for empty buckets. -| `aggregationType` | Value reported for each empty bucket | +| `aggregators` | Value reported for each empty bucket | | -------------------- | ------------------------------------ | | `sum`, `count` | `0` | | `last` | The value of the last sample before the bucket's start. `NaN` when no such sample. | diff --git a/content/commands/ts.range.md b/content/commands/ts.range.md index e2a8683f56..9ac4654e95 100644 --- a/content/commands/ts.range.md +++ b/content/commands/ts.range.md @@ -39,7 +39,7 @@ arguments: optional: true token: ALIGN type: integer - - name: aggregationType + - name: aggregators token: AGGREGATION type: string - name: bucketDuration @@ -79,11 +79,11 @@ since: 1.0.0 stack_path: docs/data-types/timeseries summary: Query a range in forward direction syntax: "TS.RANGE key fromTimestamp toTimestamp\n [LATEST]\n [FILTER_BY_TS ts...]\n\ - \ [FILTER_BY_VALUE min max]\n [COUNT count] \n [[ALIGN align] AGGREGATION aggregationType[,aggregationType ...]\ + \ [FILTER_BY_VALUE min max]\n [COUNT count] \n [[ALIGN align] AGGREGATION aggregators\ \ bucketDuration [BUCKETTIMESTAMP bt] [EMPTY]]\n" syntax_fmt: "TS.RANGE key fromTimestamp toTimestamp [LATEST]\n [FILTER_BY_TS\_Timestamp\ \ [Timestamp ...]] [FILTER_BY_VALUE min max]\n [COUNT\_count] [[ALIGN\_value] AGGREGATION\_\ - aggregationType[,aggregationType ...]\n bucketDuration [BUCKETTIMESTAMP] [EMPTY]]" + aggregators bucketDuration [BUCKETTIMESTAMP] [EMPTY]]" title: TS.RANGE --- @@ -162,13 +162,13 @@ is a time bucket alignment control for `AGGREGATION`. It controls the time bucke
-AGGREGATION aggregationType[,aggregationType ...] bucketDuration +AGGREGATION aggregators bucketDuration -per time series, aggregates samples into time buckets, where: +for each time series, aggregates samples into time buckets, where: - - `aggregationType` takes one or more of the following aggregation types: + - `aggregators` is one or more comma-separated aggregator from the following table: - | `aggregationType` | Description | + | aggregator | Description | | ------------ | --------------------------------------------------------------- | | `avg` | Arithmetic mean of all non-NaN values | | `sum` | Sum of all non-NaN values | @@ -187,6 +187,11 @@ per time series, aggregates samples into time buckets, where: | `twa` | Time-weighted average over the bucket's timeframe (ignores NaN values) (since RedisTimeSeries 1.8) | - `bucketDuration` is duration of each bucket, in milliseconds. + + Note: `aggregators` can either be a single aggregator or multiple aggregators separated by commas as shown below. + No whitespace is allowed between aggregators. + + AGGREGATION min,avg,max Without `ALIGN`, bucket start times are multiples of `bucketDuration`. @@ -212,7 +217,7 @@ controls how bucket timestamps are reported. is a flag, which, when specified, reports aggregations also for empty buckets. -| `aggregationType` | Value reported for each empty bucket | +| `aggregators` | Value reported for each empty bucket | | -------------------- | ------------------------------------ | | `sum`, `count` | `0` | | `last` | The value of the last sample before the bucket's start. `NaN` when no such sample. | diff --git a/content/commands/ts.revrange.md b/content/commands/ts.revrange.md index 1605bb46fe..3ebbc76ca7 100644 --- a/content/commands/ts.revrange.md +++ b/content/commands/ts.revrange.md @@ -39,7 +39,7 @@ arguments: optional: true token: ALIGN type: integer - - name: aggregationType + - name: aggregators token: AGGREGATION type: string - name: bucketDuration @@ -79,11 +79,11 @@ since: 1.4.0 stack_path: docs/data-types/timeseries summary: Query a range in reverse direction syntax: "TS.REVRANGE key fromTimestamp toTimestamp\n [LATEST]\n [FILTER_BY_TS ts...]\n\ - \ [FILTER_BY_VALUE min max]\n [COUNT count]\n [[ALIGN align] AGGREGATION aggregationType[,aggregationType ...]\ + \ [FILTER_BY_VALUE min max]\n [COUNT count]\n [[ALIGN align] AGGREGATION aggregators\ \ bucketDuration [BUCKETTIMESTAMP bt] [EMPTY]]\n" syntax_fmt: "TS.REVRANGE key fromTimestamp toTimestamp [LATEST]\n [FILTER_BY_TS\_\ Timestamp [Timestamp ...]] [FILTER_BY_VALUE min max]\n [COUNT\_count] [[ALIGN\_\ - value] AGGREGATION\_aggregationType[,aggregationType ...]\n bucketDuration [BUCKETTIMESTAMP]\ + value] AGGREGATION\_aggregators\n bucketDuration [BUCKETTIMESTAMP]\ \ [EMPTY]]" title: TS.REVRANGE --- @@ -164,12 +164,13 @@ Values include:
-AGGREGATION aggregationType[,aggregationType ...] bucketDuration -aggregates samples into time buckets, where: +AGGREGATION aggregators bucketDuration - - `aggregationType` takes one or more of the following aggregation types: +for each time series, aggregates samples into time buckets, where: - | `aggregationType` | Description | + - `aggregators` is one or more comma-separated aggregator from the following table: + + | aggregator | Description | | ------------ | --------------------------------------------------------------- | | `avg` | Arithmetic mean of all non-NaN values | | `sum` | Sum of all non-NaN values | @@ -188,7 +189,12 @@ aggregates samples into time buckets, where: | `twa` | Time-weighted average over the bucket's timeframe (ignores NaN values) (since RedisTimeSeries 1.8) | - `bucketDuration` is duration of each bucket, in milliseconds. - + + Note: `aggregators` can either be a single aggregator or multiple aggregators separated by commas as shown below. + No whitespace is allowed between aggregators. + + AGGREGATION min,avg,max + Without `ALIGN`, bucket start times are multiples of `bucketDuration`. With `ALIGN align`, bucket start times are multiples of `bucketDuration` with remainder `align % bucketDuration`. @@ -212,7 +218,7 @@ controls how bucket timestamps are reported. [EMPTY] (since RedisTimeSeries 1.8) is a flag, which, when specified, reports aggregations also for empty buckets. -| `aggregationType` | Value reported for each empty bucket | +| `aggregators` | Value reported for each empty bucket | | -------------------- | ------------------------------------ | | `sum`, `count` | `0` | | `last` | The value of the last sample before the bucket's start. `NaN` when no such sample. | diff --git a/content/develop/data-types/timeseries/_index.md b/content/develop/data-types/timeseries/_index.md index 83e7d2adb1..2c7eb97146 100644 --- a/content/develop/data-types/timeseries/_index.md +++ b/content/develop/data-types/timeseries/_index.md @@ -383,7 +383,7 @@ bucket by an aggregate value, such as the average or maximum value. For example, if you expect to collect more than one billion data points in a day, you could aggregate the data using buckets of one minute. Since each bucket is represented by a single value, this reduces the dataset size to 1,440 data points (24 hours x 60 minutes = 1,440 minutes). -The range query commands let you specify one or more aggregation function and bucket size. +The range query commands let you specify one or more aggregation functions and bucket size. The available aggregation functions are: - `avg`: Arithmetic mean of all values diff --git a/static/images/railroad/ts.mrange.svg b/static/images/railroad/ts.mrange.svg index 2c52d2e1a1..c4949d5188 100644 --- a/static/images/railroad/ts.mrange.svg +++ b/static/images/railroad/ts.mrange.svg @@ -1,4 +1,4 @@ - + - + TS.MRANGE fromTimestamp toTimestamp @@ -56,8 +56,8 @@ circle { fill: #DC382D !important; stroke: #DC382D !important; } FILTER_BY_TS -Timestamp -, +Timestamp + @@ -78,53 +78,51 @@ circle { fill: #DC382D !important; stroke: #DC382D !important; } COUNT count - - - + + + ALIGN value - -AGGREGATION - -aggregationType -, -bucketDuration - - -BUCKETTIMESTAMP - - -EMPTY - - -FILTER - -l=v -l!=v -l= -l!= -l=(v1,v2,...) -l!=(v1,v2,...) - - - - -FILTER - -l=v -l!=v -l= -l!= -l=(v1,v2,...) -l!=(v1,v2,...) - - - - -GROUPBY -label -REDUCE -reducer \ No newline at end of file + +AGGREGATION +aggregators +bucketDuration + + +BUCKETTIMESTAMP + + +EMPTY + + +FILTER + +l=v +l!=v +l= +l!= +l=(v1,v2,...) +l!=(v1,v2,...) + + + + +FILTER + +l=v +l!=v +l= +l!= +l=(v1,v2,...) +l!=(v1,v2,...) + + + + +GROUPBY +label +REDUCE +reducer \ No newline at end of file diff --git a/static/images/railroad/ts.mrevrange.svg b/static/images/railroad/ts.mrevrange.svg index 92f4d0aa96..cbc1eae947 100644 --- a/static/images/railroad/ts.mrevrange.svg +++ b/static/images/railroad/ts.mrevrange.svg @@ -1,4 +1,4 @@ - + - + TS.MREVRANGE fromTimestamp toTimestamp - -LATEST + +LATEST FILTER_BY_TS -Timestamp -, +Timestamp + @@ -78,53 +78,51 @@ circle { fill: #DC382D !important; stroke: #DC382D !important; } COUNT count - - - + + + ALIGN value - -AGGREGATION - -aggregationType -, -bucketDuration - - -BUCKETTIMESTAMP - - -EMPTY - - -FILTER - -l=v -l!=v -l= -l!= -l=(v1,v2,...) -l!=(v1,v2,...) - - - - -FILTER - -l=v -l!=v -l= -l!= -l=(v1,v2,...) -l!=(v1,v2,...) - - - - -GROUPBY -label -REDUCE -reducer \ No newline at end of file + +AGGREGATION +aggregators +bucketDuration + + +BUCKETTIMESTAMP + + +EMPTY + + +FILTER + +l=v +l!=v +l= +l!= +l=(v1,v2,...) +l!=(v1,v2,...) + + + + +FILTER + +l=v +l!=v +l= +l!= +l=(v1,v2,...) +l!=(v1,v2,...) + + + + +GROUPBY +label +REDUCE +reducer \ No newline at end of file diff --git a/static/images/railroad/ts.range.svg b/static/images/railroad/ts.range.svg index 52f327e0fb..cfffdcad2e 100644 --- a/static/images/railroad/ts.range.svg +++ b/static/images/railroad/ts.range.svg @@ -1,4 +1,4 @@ - + - + TS.RANGE key fromTimestamp @@ -57,8 +57,8 @@ circle { fill: #DC382D !important; stroke: #DC382D !important; } FILTER_BY_TS -Timestamp -, +Timestamp + @@ -70,23 +70,21 @@ circle { fill: #DC382D !important; stroke: #DC382D !important; } COUNT count - - - + + + ALIGN value - -AGGREGATION - -aggregationType -, -bucketDuration - - -BUCKETTIMESTAMP - - -EMPTY \ No newline at end of file + +AGGREGATION +aggregators +bucketDuration + + +BUCKETTIMESTAMP + + +EMPTY \ No newline at end of file diff --git a/static/images/railroad/ts.revrange.svg b/static/images/railroad/ts.revrange.svg index c3a963cd85..83769d4403 100644 --- a/static/images/railroad/ts.revrange.svg +++ b/static/images/railroad/ts.revrange.svg @@ -1,4 +1,4 @@ - + - + TS.REVRANGE key fromTimestamp @@ -57,8 +57,8 @@ circle { fill: #DC382D !important; stroke: #DC382D !important; } FILTER_BY_TS -Timestamp -, +Timestamp + @@ -70,23 +70,29 @@ circle { fill: #DC382D !important; stroke: #DC382D !important; } COUNT count - - - + + + ALIGN value - -AGGREGATION - -aggregationType -, -bucketDuration - - -BUCKETTIMESTAMP - - -EMPTY \ No newline at end of file + +AGGREGATION +aggregators +bucketDuration + + + +BUCKETTIMESTAMP + +- +start ++ +end +~ +mid + + +EMPTY \ No newline at end of file