Skip to content

DEV: add RESP2/3 return information to the RQE commands #1874

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jul 25, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions content/commands/cf.exists.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ redis> CF.EXISTS cf item2
(integer) 0
{{< / highlight >}}

## Return information

{{< multitabs id="cf-exists-return-info"
tab1="RESP2"
tab2="RESP3" >}}
Expand Down
2 changes: 2 additions & 0 deletions content/commands/cms.info.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ redis> CMS.INFO test
6) (integer) 0
```

## Return information

{{< multitabs id=“cms-info-return-info"
tab1="RESP2"
tab2="RESP3" >}}
Expand Down
2 changes: 2 additions & 0 deletions content/commands/cms.query.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ redis> CMS.QUERY test foo bar
2) (integer) 42
```

## Return information

{{< multitabs id=“cms-merge-return-info"
tab1="RESP2"
tab2="RESP3" >}}
Expand Down
20 changes: 15 additions & 5 deletions content/commands/ft._list.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,25 @@ In the future, a [`SCAN`]({{< relref "/commands/scan" >}}) type of command will
contains a large number of indices.
{{% /alert %}}

## Return

[Array reply]({{< relref "/develop/reference/protocol-spec#arrays" >}}) with index names.

## Examples

```sql
FT._LIST
1) "idx"
2) "movies"
3) "imdb"
```
```

## Return information

{{< multitabs id="ft-_list-return-info"
tab1="RESP2"
tab2="RESP3" >}}

[Array]({{< relref "/develop/reference/protocol-spec#arrays" >}}) of index names as [simple strings]({{< relref "/develop/reference/protocol-spec#simple-strings" >}}).

-tab-sep-

[Set]({{< relref "/develop/reference/protocol-spec#sets" >}}) of index names as [simple strings]({{< relref "/develop/reference/protocol-spec#simple-strings" >}}).

{{< /multitabs >}}
33 changes: 25 additions & 8 deletions content/commands/ft.aggregate.md
Original file line number Diff line number Diff line change
Expand Up @@ -354,12 +354,7 @@ You can use `@__score` in a pipeline as shown in the following example:
selects the dialect version under which to execute the query. If not specified, the query will execute under the default dialect version set during module initial loading or via [`FT.CONFIG SET`]({{< relref "commands/ft.config-set/" >}}) command.
</details>

## Return

FT.AGGREGATE returns an array reply where each row is an array reply and represents a single aggregate result.
The [integer reply]({{< relref "develop/reference/protocol-spec#resp-integers" >}}) at position `1` does not represent a valid value.

### Return multiple values
## Return multiple values

See [Return multiple values]({{< relref "commands/ft.search#return-multiple-values/" >}}) in [`FT.SEARCH`]({{< relref "commands/ft.search/" >}})
The `DIALECT` can be specified as a parameter in the FT.AGGREGATE command. If it is not specified, the `DEFAULT_DIALECT` is used, which can be set using [`FT.CONFIG SET`]({{< relref "commands/ft.config-set/" >}}) or by passing it as an argument to the `redisearch` module when it is loaded.
Expand Down Expand Up @@ -489,13 +484,35 @@ Next, count GitHub events by user (actor), to produce the most active users.

</details>

## Return information

{{< multitabs id="ft-aggregate-return-info"
tab1="RESP2"
tab2="RESP3" >}}

One of the following:
* [Array]({{< relref "/develop/reference/protocol-spec#arrays" >}}) with the first element being the total number of results, followed by result rows as [arrays]({{< relref "/develop/reference/protocol-spec#arrays" >}}) of field-value pairs.
* [Simple error reply]({{< relref "/develop/reference/protocol-spec#simple-errors" >}}) in these cases: incorrect number of arguments, non-existent index, invalid query syntax.

-tab-sep-

One of the following:
* [Map]({{< relref "/develop/reference/protocol-spec#maps" >}}) with the following fields:
- `attributes`: [Array]({{< relref "/develop/reference/protocol-spec#arrays" >}}) of attribute names.
- `format`: [Simple string]({{< relref "/develop/reference/protocol-spec#simple-strings" >}}) - result format.
- `results`: [Array]({{< relref "/develop/reference/protocol-spec#arrays" >}}) of [maps]({{< relref "/develop/reference/protocol-spec#maps" >}}) containing aggregated data.
- `total_results`: [Integer]({{< relref "/develop/reference/protocol-spec#integers" >}}) - total number of results.
- `warning`: [Array]({{< relref "/develop/reference/protocol-spec#arrays" >}}) of warning messages.
* [Simple error reply]({{< relref "/develop/reference/protocol-spec#simple-errors" >}}) in these cases: incorrect number of arguments, non-existent index, invalid query syntax.

{{< /multitabs >}}

## See also

[`FT.CONFIG SET`]({{< relref "commands/ft.config-set/" >}}) | [`FT.SEARCH`]({{< relref "commands/ft.search/" >}})
[`FT.CONFIG SET`]({{< relref "commands/ft.config-set/" >}}) | [`FT.SEARCH`]({{< relref "commands/ft.search/" >}})

## Related topics

- [Aggregations]({{< relref "/develop/ai/search-and-query/advanced-concepts/aggregations" >}})
- [Key and field expiration behavior]({{< relref "/develop/ai/search-and-query/advanced-concepts/expiration" >}})
- [RediSearch]({{< relref "/develop/ai/search-and-query" >}})

26 changes: 18 additions & 8 deletions content/commands/ft.aliasadd.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,6 @@ alias.

FT.ALIASADD allows administrators to transparently redirect application queries to alternative indexes.

## Return

FT.ALIASADD returns a simple string reply `OK` if executed correctly, or an error reply otherwise.

## Examples

<details open>
Expand All @@ -74,10 +70,24 @@ Attempting to add the same alias returns a message that the alias already exists
{{< / highlight >}}
</details>

## See also
## Return information

{{< multitabs id="ft-aliasadd-return-info"
tab1="RESP2"
tab2="RESP3" >}}

[`FT.ALIASDEL`]({{< relref "commands/ft.aliasdel/" >}}) | [`FT.ALIASUPDATE`]({{< relref "commands/ft.aliasupdate/" >}})
One of the following:
* [Simple string reply]({{< relref "/develop/reference/protocol-spec#simple-strings" >}}): `OK` if executed correctly.
* [Simple error reply]({{< relref "/develop/reference/protocol-spec#simple-errors" >}}) in these cases: alias already exists, index does not exist.

## Related topics
-tab-sep-

One of the following:
* [Simple string reply]({{< relref "/develop/reference/protocol-spec#simple-strings" >}}): `OK` if executed correctly.
* [Simple error reply]({{< relref "/develop/reference/protocol-spec#simple-errors" >}}) in these cases: alias already exists, index does not exist.

{{< /multitabs >}}

## See also

[RediSearch]({{< relref "/develop/ai/search-and-query/" >}})
[`FT.ALIASDEL`]({{< relref "commands/ft.aliasdel/" >}}) | [`FT.ALIASUPDATE`]({{< relref "commands/ft.aliasupdate/" >}})
26 changes: 18 additions & 8 deletions content/commands/ft.aliasdel.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,6 @@ Remove an alias from an index
is index alias to be removed.
</details>

## Return

FT.ALIASDEL returns a simple string reply `OK` if executed correctly, or an error reply otherwise.

## Examples

<details open>
Expand All @@ -60,10 +56,24 @@ OK
{{< / highlight >}}
</details>

## See also
## Return information

{{< multitabs id="ft-aliasdel-return-info"
tab1="RESP2"
tab2="RESP3" >}}

[`FT.ALIASADD`]({{< relref "commands/ft.aliasadd/" >}}) | [`FT.ALIASUPDATE`]({{< relref "commands/ft.aliasupdate/" >}})
One of the following:
* [Simple string reply]({{< relref "/develop/reference/protocol-spec#simple-strings" >}}): `OK` if executed correctly.
* [Simple error reply]({{< relref "/develop/reference/protocol-spec#simple-errors" >}}) in these cases: alias does not exist.

## Related topics
-tab-sep-

One of the following:
* [Simple string reply]({{< relref "/develop/reference/protocol-spec#simple-strings" >}}): `OK` if executed correctly.
* [Simple error reply]({{< relref "/develop/reference/protocol-spec#simple-errors" >}}) in these cases: alias does not exist.

{{< /multitabs >}}

## See also

[RediSearch]({{< relref "/develop/ai/search-and-query/" >}})
[`FT.ALIASADD`]({{< relref "commands/ft.aliasadd/" >}}) | [`FT.ALIASUPDATE`]({{< relref "commands/ft.aliasupdate/" >}})
22 changes: 18 additions & 4 deletions content/commands/ft.aliasupdate.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,6 @@ index, FT.ALIASUPDATE removes the alias association with the previous index.
is alias to be added to an index.
</details>

## Return

FT.ALIASUPDATE returns a simple string reply `OK` if executed correctly, or an error reply otherwise.

## Examples

<details open>
Expand All @@ -62,6 +58,24 @@ Update the alias of an index.
OK
{{< / highlight >}}

## Return information

{{< multitabs id="ft-aliasupdate-return-info"
tab1="RESP2"
tab2="RESP3" >}}

One of the following:
* [Simple string reply]({{< relref "/develop/reference/protocol-spec#simple-strings" >}}): `OK` if executed correctly.
* [Simple error reply]({{< relref "/develop/reference/protocol-spec#simple-errors" >}}) in these cases: index does not exist.

-tab-sep-

One of the following:
* [Simple string reply]({{< relref "/develop/reference/protocol-spec#simple-strings" >}}): `OK` if executed correctly.
* [Simple error reply]({{< relref "/develop/reference/protocol-spec#simple-errors" >}}) in these cases: index does not exist.

{{< /multitabs >}}

## See also

[`FT.ALIASADD`]({{< relref "commands/ft.aliasadd/" >}}) | [`FT.ALIASDEL`]({{< relref "commands/ft.aliasdel/" >}})
Expand Down
22 changes: 18 additions & 4 deletions content/commands/ft.alter.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,6 @@ contain more than 32 attributes, create it with the `MAXTEXTFIELDS` option.
</note>
</details>

## Return

FT.ALTER returns a simple string reply `OK` if executed correctly, or an error reply otherwise.

## Examples

<details open>
Expand All @@ -96,6 +92,24 @@ OK
{{< / highlight >}}
</details>

## Return information

{{< multitabs id="ft-alter-return-info"
tab1="RESP2"
tab2="RESP3" >}}

One of the following:
* [Simple string reply]({{< relref "/develop/reference/protocol-spec#simple-strings" >}}): `OK` if executed correctly.
* [Simple error reply]({{< relref "/develop/reference/protocol-spec#simple-errors" >}}) in these cases: no such index, invalid schema syntax.

-tab-sep-

One of the following:
* [Simple string reply]({{< relref "/develop/reference/protocol-spec#simple-strings" >}}): `OK` if executed correctly.
* [Simple error reply]({{< relref "/develop/reference/protocol-spec#simple-errors" >}}) in these cases: no such index, invalid schema syntax.

{{< /multitabs >}}

## See also

[`FT.CREATE`]({{< relref "commands/ft.create/" >}})
Expand Down
20 changes: 15 additions & 5 deletions content/commands/ft.config-get.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,6 @@ Retrieve configuration options
is name of the configuration option, or '*' for all.
</details>

## Return

FT.CONFIG GET returns an array reply of the configuration name and value.

## Examples

<details open>
Expand Down Expand Up @@ -140,9 +136,23 @@ FT.CONFIG GET returns an array reply of the configuration name and value.
{{< / highlight >}}
</details>

## Return information

{{< multitabs id="ft-config-get-return-info"
tab1="RESP2"
tab2="RESP3" >}}

[Array]({{< relref "/develop/reference/protocol-spec#arrays" >}}) of [arrays]({{< relref "/develop/reference/protocol-spec#arrays" >}}), where each sub-array contains a configuration option name and its value.

-tab-sep-

[Map]({{< relref "/develop/reference/protocol-spec#maps" >}}) where keys are configuration option names and values are their corresponding values.

{{< /multitabs >}}

## See also

[`FT.CONFIG SET`]({{< relref "commands/ft.config-set/" >}}) | [`FT.CONFIG HELP`]({{< relref "commands/ft.config-help/" >}})
[`FT.CONFIG SET`]({{< relref "commands/ft.config-set/" >}}) | [`FT.CONFIG HELP`]({{< relref "commands/ft.config-help/" >}})

## Related topics

Expand Down
18 changes: 14 additions & 4 deletions content/commands/ft.config-help.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,6 @@ Describe configuration options
is name of the configuration option, or '*' for all.
</details>

## Return

FT.CONFIG HELP returns an array reply of the configuration name and value.

## Examples

<details open>
Expand All @@ -65,6 +61,20 @@ FT.CONFIG HELP returns an array reply of the configuration name and value.
{{< / highlight >}}
</details>

## Return information

{{< multitabs id="ft-config-help-return-info"
tab1="RESP2"
tab2="RESP3" >}}

[Array]({{< relref "/develop/reference/protocol-spec#arrays" >}}) of help information.

-tab-sep-

[Array]({{< relref "/develop/reference/protocol-spec#arrays" >}}) of help information.

{{< /multitabs >}}

## See also

[`FT.CONFIG SET`]({{< relref "commands/ft.config-set/" >}}) | [`FT.CONFIG GET`]({{< relref "commands/ft.config-get/" >}})
Expand Down
22 changes: 18 additions & 4 deletions content/commands/ft.config-set.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,6 @@ is name of the configuration option, or '*' for all.
is value of the configuration option.
</details>

## Return

FT.CONFIG SET returns a simple string reply `OK` if executed correctly, or an error reply otherwise.

## Examples

<details open>
Expand All @@ -77,6 +73,24 @@ OK
{{< / highlight >}}
</details>

## Return information

{{< multitabs id="ft-config-set-return-info"
tab1="RESP2"
tab2="RESP3" >}}

One of the following:
* [Simple string reply]({{< relref "/develop/reference/protocol-spec#simple-strings" >}}): `OK` if executed correctly.
* [Simple error reply]({{< relref "/develop/reference/protocol-spec#simple-errors" >}}) in these cases: invalid option, invalid value.

-tab-sep-

One of the following:
* [Simple string reply]({{< relref "/develop/reference/protocol-spec#simple-strings" >}}): `OK` if executed correctly.
* [Simple error reply]({{< relref "/develop/reference/protocol-spec#simple-errors" >}}) in these cases: invalid option, invalid value.

{{< /multitabs >}}

## See also

[`FT.CONFIG GET`]({{< relref "commands/ft.config-get/" >}}) | [`FT.CONFIG HELP`]({{< relref "commands/ft.config-help/" >}})
Expand Down
Loading