From 171e9b353d27dfcad7a74cec6ba3631b19203318 Mon Sep 17 00:00:00 2001 From: Lior Kogan Date: Mon, 22 Jun 2026 10:25:19 +0300 Subject: [PATCH 1/4] Refactor reply descriptions - multiple aggregators --- content/commands/ts.range.md | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/content/commands/ts.range.md b/content/commands/ts.range.md index c9e31434f4..5f4e9c68fc 100644 --- a/content/commands/ts.range.md +++ b/content/commands/ts.range.md @@ -362,13 +362,21 @@ Similarly, when the end timestamp for the range query is explicitly stated, you tab2="RESP3" >}} One of the following: -* [Array reply]({{< relref "/develop/reference/protocol-spec#arrays" >}}) of ([Integer reply]({{< relref "/develop/reference/protocol-spec#integers" >}}), [Simple string reply]({{< relref "/develop/reference/protocol-spec#simple-strings" >}})) pairs representing (timestamp, value). +* [Array reply]({{< relref "/develop/reference/protocol-spec#arrays" >}}) of + * Without `AGGREGATION` or with a single aggregator: + ([Integer reply]({{< relref "/develop/reference/protocol-spec#integers" >}}), [Simple string reply]({{< relref "/develop/reference/protocol-spec#simple-strings" >}})) pairs representing (timestamp, value). + * With multiple aggregators: + ([Integer reply]({{< relref "/develop/reference/protocol-spec#integers" >}}), multiple [Simple string reply]({{< relref "/develop/reference/protocol-spec#simple-strings" >}})) tuples representing (timestamp, value...). * [Simple error reply]({{< relref "/develop/reference/protocol-spec#simple-errors" >}}) in these cases: invalid filter value, wrong key type, key does not exist, etc. -tab-sep- One of the following: -* [Array reply]({{< relref "/develop/reference/protocol-spec#arrays" >}}) of ([Integer reply]({{< relref "/develop/reference/protocol-spec#integers" >}}), [Double reply]({{< relref "/develop/reference/protocol-spec#doubles" >}})) pairs representing (timestamp, value). +* [Array reply]({{< relref "/develop/reference/protocol-spec#arrays" >}}) of + * Without `AGGREGATION` or with a single aggregator: + ([Integer reply]({{< relref "/develop/reference/protocol-spec#integers" >}}), [Double reply]({{< relref "/develop/reference/protocol-spec#doubles" >}})) pairs representing (timestamp, value). + * With multiple aggregators: + ([Integer reply]({{< relref "/develop/reference/protocol-spec#integers" >}}), multiple [Double reply]({{< relref "/develop/reference/protocol-spec#doubles" >}})) tuples representing (timestamp, value...). * [Simple error reply]({{< relref "/develop/reference/protocol-spec#simple-errors" >}}) in these cases: invalid filter value, wrong key type, key does not exist, etc. {{< /multitabs >}} From cde3bc97979df7623d591dad0f8a2ef47026b75c Mon Sep 17 00:00:00 2001 From: "David W. Dougherty" Date: Mon, 22 Jun 2026 10:48:35 -0700 Subject: [PATCH 2/4] Add other 3 commands --- content/commands/ts.mrange.md | 12 ++++++++++-- content/commands/ts.mrevrange.md | 12 ++++++++++-- content/commands/ts.revrange.md | 12 ++++++++++-- 3 files changed, 30 insertions(+), 6 deletions(-) diff --git a/content/commands/ts.mrange.md b/content/commands/ts.mrange.md index c87f7ad99a..1ef03e52ab 100644 --- a/content/commands/ts.mrange.md +++ b/content/commands/ts.mrange.md @@ -563,7 +563,11 @@ If `GROUPBY label REDUCE reducer` is not specified: - By default, an empty array is reported - If `WITHLABELS` is specified, all labels associated with this time series are reported - If `SELECTED_LABELS label...` is specified, the selected labels are reported (null value when no such label defined) -- [Array reply]({{< relref "/develop/reference/protocol-spec#arrays" >}}): timestamp-value pairs ([Integer reply]({{< relref "/develop/reference/protocol-spec#integers" >}}), [Simple string reply]({{< relref "/develop/reference/protocol-spec#simple-strings" >}})) representing all samples/aggregations matching the range +- [Array reply]({{< relref "/develop/reference/protocol-spec#arrays" >}}): representing all samples/aggregations matching the range: + - Without `AGGREGATION` or with a single aggregator: + timestamp-value pairs ([Integer reply]({{< relref "/develop/reference/protocol-spec#integers" >}}), [Simple string reply]({{< relref "/develop/reference/protocol-spec#simple-strings" >}})) representing (timestamp, value) + - With multiple aggregators: + timestamp-value tuples ([Integer reply]({{< relref "/develop/reference/protocol-spec#integers" >}}), multiple [Simple string reply]({{< relref "/develop/reference/protocol-spec#simple-strings" >}})) representing (timestamp, value...) If `GROUPBY label REDUCE reducer` is specified: @@ -589,7 +593,11 @@ If `GROUPBY label REDUCE reducer` is not specified: - If `WITHLABELS` is specified, all labels associated with this time series are reported as a map - If `SELECTED_LABELS label...` is specified, the selected labels are reported as a map (null value when no such label defined) - Additional metadata including aggregators information -- [Array reply]({{< relref "/develop/reference/protocol-spec#arrays" >}}): timestamp-value pairs ([Integer reply]({{< relref "/develop/reference/protocol-spec#integers" >}}), [Double reply]({{< relref "/develop/reference/protocol-spec#doubles" >}})) representing all samples/aggregations matching the range +- [Array reply]({{< relref "/develop/reference/protocol-spec#arrays" >}}): representing all samples/aggregations matching the range: + - Without `AGGREGATION` or with a single aggregator: + timestamp-value pairs ([Integer reply]({{< relref "/develop/reference/protocol-spec#integers" >}}), [Double reply]({{< relref "/develop/reference/protocol-spec#doubles" >}})) representing (timestamp, value) + - With multiple aggregators: + timestamp-value tuples ([Integer reply]({{< relref "/develop/reference/protocol-spec#integers" >}}), multiple [Double reply]({{< relref "/develop/reference/protocol-spec#doubles" >}})) representing (timestamp, value...) If `GROUPBY label REDUCE reducer` is specified: diff --git a/content/commands/ts.mrevrange.md b/content/commands/ts.mrevrange.md index f4f83e829c..53c24b9930 100644 --- a/content/commands/ts.mrevrange.md +++ b/content/commands/ts.mrevrange.md @@ -562,7 +562,11 @@ If `GROUPBY label REDUCE reducer` is not specified: - By default, an empty array is reported - If `WITHLABELS` is specified, all labels associated with this time series are reported - If `SELECTED_LABELS label...` is specified, the selected labels are reported -- [Array reply]({{< relref "/develop/reference/protocol-spec#arrays" >}}): timestamp-value pairs ([Integer reply]({{< relref "/develop/reference/protocol-spec#integers" >}}), [Simple string reply]({{< relref "/develop/reference/protocol-spec#simple-strings" >}})) representing all samples/aggregations matching the range in reverse chronological order +- [Array reply]({{< relref "/develop/reference/protocol-spec#arrays" >}}): representing all samples/aggregations matching the range in reverse chronological order: + - Without `AGGREGATION` or with a single aggregator: + timestamp-value pairs ([Integer reply]({{< relref "/develop/reference/protocol-spec#integers" >}}), [Simple string reply]({{< relref "/develop/reference/protocol-spec#simple-strings" >}})) representing (timestamp, value) + - With multiple aggregators: + timestamp-value tuples ([Integer reply]({{< relref "/develop/reference/protocol-spec#integers" >}}), multiple [Simple string reply]({{< relref "/develop/reference/protocol-spec#simple-strings" >}})) representing (timestamp, value...) If `GROUPBY label REDUCE reducer` is specified: @@ -584,7 +588,11 @@ If `GROUPBY label REDUCE reducer` is not specified: - If `WITHLABELS` is specified, all labels associated with this time series are reported as a map - If `SELECTED_LABELS label...` is specified, the selected labels are reported as a map - Additional metadata including aggregators information -- [Array reply]({{< relref "/develop/reference/protocol-spec#arrays" >}}): timestamp-value pairs ([Integer reply]({{< relref "/develop/reference/protocol-spec#integers" >}}), [Double reply]({{< relref "/develop/reference/protocol-spec#doubles" >}})) representing all samples/aggregations matching the range in reverse chronological order +- [Array reply]({{< relref "/develop/reference/protocol-spec#arrays" >}}): representing all samples/aggregations matching the range in reverse chronological order: + - Without `AGGREGATION` or with a single aggregator: + timestamp-value pairs ([Integer reply]({{< relref "/develop/reference/protocol-spec#integers" >}}), [Double reply]({{< relref "/develop/reference/protocol-spec#doubles" >}})) representing (timestamp, value) + - With multiple aggregators: + timestamp-value tuples ([Integer reply]({{< relref "/develop/reference/protocol-spec#integers" >}}), multiple [Double reply]({{< relref "/develop/reference/protocol-spec#doubles" >}})) representing (timestamp, value...) If `GROUPBY label REDUCE reducer` is specified: diff --git a/content/commands/ts.revrange.md b/content/commands/ts.revrange.md index c9733ca829..90d5a4eac8 100644 --- a/content/commands/ts.revrange.md +++ b/content/commands/ts.revrange.md @@ -365,13 +365,21 @@ Similarly, when the end timestamp for the range query is explicitly stated, you tab2="RESP3" >}} One of the following: -* [Array reply]({{< relref "/develop/reference/protocol-spec#arrays" >}}) of ([Integer reply]({{< relref "/develop/reference/protocol-spec#integers" >}}), [Simple string reply]({{< relref "/develop/reference/protocol-spec#simple-strings" >}})) pairs representing (timestamp, value) in reverse chronological order. +* [Array reply]({{< relref "/develop/reference/protocol-spec#arrays" >}}) of + * Without `AGGREGATION` or with a single aggregator: + ([Integer reply]({{< relref "/develop/reference/protocol-spec#integers" >}}), [Simple string reply]({{< relref "/develop/reference/protocol-spec#simple-strings" >}})) pairs representing (timestamp, value) in reverse chronological order. + * With multiple aggregators: + ([Integer reply]({{< relref "/develop/reference/protocol-spec#integers" >}}), multiple [Simple string reply]({{< relref "/develop/reference/protocol-spec#simple-strings" >}})) tuples representing (timestamp, value...) in reverse chronological order. * [Simple error reply]({{< relref "/develop/reference/protocol-spec#simple-errors" >}}) in these cases: invalid filter value, wrong key type, key does not exist, etc. -tab-sep- One of the following: -* [Array reply]({{< relref "/develop/reference/protocol-spec#arrays" >}}) of ([Integer reply]({{< relref "/develop/reference/protocol-spec#integers" >}}), [Double reply]({{< relref "/develop/reference/protocol-spec#doubles" >}})) pairs representing (timestamp, value) in reverse chronological order. +* [Array reply]({{< relref "/develop/reference/protocol-spec#arrays" >}}) of + * Without `AGGREGATION` or with a single aggregator: + ([Integer reply]({{< relref "/develop/reference/protocol-spec#integers" >}}), [Double reply]({{< relref "/develop/reference/protocol-spec#doubles" >}})) pairs representing (timestamp, value) in reverse chronological order. + * With multiple aggregators: + ([Integer reply]({{< relref "/develop/reference/protocol-spec#integers" >}}), multiple [Double reply]({{< relref "/develop/reference/protocol-spec#doubles" >}})) tuples representing (timestamp, value...) in reverse chronological order. * [Simple error reply]({{< relref "/develop/reference/protocol-spec#simple-errors" >}}) in these cases: invalid filter value, wrong key type, key does not exist, etc. {{< /multitabs >}} From 0b49340c70acb37852c0373303a76f056f219613 Mon Sep 17 00:00:00 2001 From: Lior Kogan Date: Mon, 22 Jun 2026 21:52:06 +0300 Subject: [PATCH 3/4] Update array reply format in ts.mrange.md Clarify the array reply format for timestamp-value pairs in the documentation. --- content/commands/ts.mrange.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/content/commands/ts.mrange.md b/content/commands/ts.mrange.md index 1ef03e52ab..1a970690f8 100644 --- a/content/commands/ts.mrange.md +++ b/content/commands/ts.mrange.md @@ -580,7 +580,11 @@ If `GROUPBY label REDUCE reducer` is specified: - [Array reply]({{< relref "/develop/reference/protocol-spec#arrays" >}}): either a single pair ([Bulk string reply]({{< relref "/develop/reference/protocol-spec#bulk-strings" >}}), [Bulk string reply]({{< relref "/develop/reference/protocol-spec#bulk-strings" >}})): the `GROUPBY` label argument and value, or empty array - [Array reply]({{< relref "/develop/reference/protocol-spec#arrays" >}}): a single pair ([Bulk string reply]({{< relref "/develop/reference/protocol-spec#bulk-strings" >}}), [Bulk string reply]({{< relref "/develop/reference/protocol-spec#bulk-strings" >}})): the string `__reducer__` and the reducer argument - [Array reply]({{< relref "/develop/reference/protocol-spec#arrays" >}}): a single pair ([Bulk string reply]({{< relref "/develop/reference/protocol-spec#bulk-strings" >}}), [Bulk string reply]({{< relref "/develop/reference/protocol-spec#bulk-strings" >}})): the string `__source__` and the time series key names separated by "," -- [Array reply]({{< relref "/develop/reference/protocol-spec#arrays" >}}): timestamp-value pairs ([Integer reply]({{< relref "/develop/reference/protocol-spec#integers" >}}), [Simple string reply]({{< relref "/develop/reference/protocol-spec#simple-strings" >}})) representing all samples/aggregations matching the range +- [Array reply]({{< relref "/develop/reference/protocol-spec#arrays" >}}): representing all samples/aggregations matching the range: + - Without `AGGREGATION` or with a single aggregator: + timestamp-value pairs ([Integer reply]({{< relref "/develop/reference/protocol-spec#integers" >}}), [Simple string reply]({{< relref "/develop/reference/protocol-spec#simple-strings" >}})) representing (timestamp, value) + - With multiple aggregators: + timestamp-value tuples ([Integer reply]({{< relref "/develop/reference/protocol-spec#integers" >}}), multiple [Simple string reply]({{< relref "/develop/reference/protocol-spec#simple-strings" >}})) representing (timestamp, value...) -tab-sep- From 7d532697fe59cb357995c8140568c2e14a7fab36 Mon Sep 17 00:00:00 2001 From: Lior Kogan Date: Mon, 22 Jun 2026 21:53:07 +0300 Subject: [PATCH 4/4] Update reverse range documentation for clarity Clarify array reply structure for reverse range results. --- content/commands/ts.mrevrange.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/content/commands/ts.mrevrange.md b/content/commands/ts.mrevrange.md index 53c24b9930..faad029143 100644 --- a/content/commands/ts.mrevrange.md +++ b/content/commands/ts.mrevrange.md @@ -575,7 +575,11 @@ If `GROUPBY label REDUCE reducer` is specified: - [Array reply]({{< relref "/develop/reference/protocol-spec#arrays" >}}): a single pair ([Bulk string reply]({{< relref "/develop/reference/protocol-spec#bulk-strings" >}}), [Bulk string reply]({{< relref "/develop/reference/protocol-spec#bulk-strings" >}})): the `GROUPBY` label argument and value - [Array reply]({{< relref "/develop/reference/protocol-spec#arrays" >}}): a single pair ([Bulk string reply]({{< relref "/develop/reference/protocol-spec#bulk-strings" >}}), [Bulk string reply]({{< relref "/develop/reference/protocol-spec#bulk-strings" >}})): the string `__reducer__` and the reducer argument - [Array reply]({{< relref "/develop/reference/protocol-spec#arrays" >}}): a single pair ([Bulk string reply]({{< relref "/develop/reference/protocol-spec#bulk-strings" >}}), [Bulk string reply]({{< relref "/develop/reference/protocol-spec#bulk-strings" >}})): the string `__source__` and the time series key names separated by "," -- [Array reply]({{< relref "/develop/reference/protocol-spec#arrays" >}}): timestamp-value pairs ([Integer reply]({{< relref "/develop/reference/protocol-spec#integers" >}}), [Simple string reply]({{< relref "/develop/reference/protocol-spec#simple-strings" >}})) representing all samples/aggregations matching the range in reverse chronological order +- [Array reply]({{< relref "/develop/reference/protocol-spec#arrays" >}}): representing all samples/aggregations matching the range in reverse chronological order: + - Without `AGGREGATION` or with a single aggregator: + timestamp-value pairs ([Integer reply]({{< relref "/develop/reference/protocol-spec#integers" >}}), [Simple string reply]({{< relref "/develop/reference/protocol-spec#simple-strings" >}})) representing (timestamp, value) + - With multiple aggregators: + timestamp-value tuples ([Integer reply]({{< relref "/develop/reference/protocol-spec#integers" >}}), multiple [Simple string reply]({{< relref "/develop/reference/protocol-spec#simple-strings" >}})) representing (timestamp, value...) -tab-sep-