diff --git a/content/commands/cf.exists.md b/content/commands/cf.exists.md index 2ff5e9173f..f561542fec 100644 --- a/content/commands/cf.exists.md +++ b/content/commands/cf.exists.md @@ -59,6 +59,8 @@ redis> CF.EXISTS cf item2 (integer) 0 {{< / highlight >}} +## Return information + {{< multitabs id="cf-exists-return-info" tab1="RESP2" tab2="RESP3" >}} diff --git a/content/commands/cms.info.md b/content/commands/cms.info.md index de4ffc6089..a33151f7bb 100644 --- a/content/commands/cms.info.md +++ b/content/commands/cms.info.md @@ -47,6 +47,8 @@ redis> CMS.INFO test 6) (integer) 0 ``` +## Return information + {{< multitabs id=“cms-info-return-info" tab1="RESP2" tab2="RESP3" >}} diff --git a/content/commands/cms.query.md b/content/commands/cms.query.md index 6e8e868106..868c0b0ec0 100644 --- a/content/commands/cms.query.md +++ b/content/commands/cms.query.md @@ -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" >}} diff --git a/content/commands/ft._list.md b/content/commands/ft._list.md index 8599080c2d..9fa871ccbe 100644 --- a/content/commands/ft._list.md +++ b/content/commands/ft._list.md @@ -38,10 +38,6 @@ 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 @@ -49,4 +45,18 @@ FT._LIST 1) "idx" 2) "movies" 3) "imdb" -``` \ No newline at end of file +``` + +## 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 >}} diff --git a/content/commands/ft.aggregate.md b/content/commands/ft.aggregate.md index 47aa2b4d28..ca5b28ed64 100644 --- a/content/commands/ft.aggregate.md +++ b/content/commands/ft.aggregate.md @@ -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. -## 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. @@ -489,13 +484,35 @@ Next, count GitHub events by user (actor), to produce the most active users. +## 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" >}}) - diff --git a/content/commands/ft.aliasadd.md b/content/commands/ft.aliasadd.md index f03c8b83ae..7205b39ca0 100644 --- a/content/commands/ft.aliasadd.md +++ b/content/commands/ft.aliasadd.md @@ -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
@@ -74,10 +70,24 @@ Attempting to add the same alias returns a message that the alias already exists {{< / highlight >}}
-## 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/" >}}) \ No newline at end of file +[`FT.ALIASDEL`]({{< relref "commands/ft.aliasdel/" >}}) | [`FT.ALIASUPDATE`]({{< relref "commands/ft.aliasupdate/" >}}) diff --git a/content/commands/ft.aliasdel.md b/content/commands/ft.aliasdel.md index 937e4db0ff..1b89514ac8 100644 --- a/content/commands/ft.aliasdel.md +++ b/content/commands/ft.aliasdel.md @@ -43,10 +43,6 @@ Remove an alias from an index is index alias to be removed. -## Return - -FT.ALIASDEL returns a simple string reply `OK` if executed correctly, or an error reply otherwise. - ## Examples
@@ -60,10 +56,24 @@ OK {{< / highlight >}}
-## 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/" >}}) \ No newline at end of file +[`FT.ALIASADD`]({{< relref "commands/ft.aliasadd/" >}}) | [`FT.ALIASUPDATE`]({{< relref "commands/ft.aliasupdate/" >}}) diff --git a/content/commands/ft.aliasupdate.md b/content/commands/ft.aliasupdate.md index d9b4aad62d..20f1bc4350 100644 --- a/content/commands/ft.aliasupdate.md +++ b/content/commands/ft.aliasupdate.md @@ -46,10 +46,6 @@ index, FT.ALIASUPDATE removes the alias association with the previous index. is alias to be added to an index. -## Return - -FT.ALIASUPDATE returns a simple string reply `OK` if executed correctly, or an error reply otherwise. - ## Examples
@@ -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/" >}}) diff --git a/content/commands/ft.alter.md b/content/commands/ft.alter.md index af5fa960a2..520b9de71e 100644 --- a/content/commands/ft.alter.md +++ b/content/commands/ft.alter.md @@ -81,10 +81,6 @@ contain more than 32 attributes, create it with the `MAXTEXTFIELDS` option.
-## Return - -FT.ALTER returns a simple string reply `OK` if executed correctly, or an error reply otherwise. - ## Examples
@@ -96,6 +92,24 @@ OK {{< / highlight >}}
+## 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/" >}}) diff --git a/content/commands/ft.config-get.md b/content/commands/ft.config-get.md index 1647f9134f..60dfe117fd 100644 --- a/content/commands/ft.config-get.md +++ b/content/commands/ft.config-get.md @@ -48,10 +48,6 @@ Retrieve configuration options is name of the configuration option, or '*' for all. -## Return - -FT.CONFIG GET returns an array reply of the configuration name and value. - ## Examples
@@ -140,9 +136,23 @@ FT.CONFIG GET returns an array reply of the configuration name and value. {{< / highlight >}}
+## 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 diff --git a/content/commands/ft.config-help.md b/content/commands/ft.config-help.md index f5cda7651e..206c914110 100644 --- a/content/commands/ft.config-help.md +++ b/content/commands/ft.config-help.md @@ -46,10 +46,6 @@ Describe configuration options is name of the configuration option, or '*' for all. -## Return - -FT.CONFIG HELP returns an array reply of the configuration name and value. - ## Examples
@@ -65,6 +61,20 @@ FT.CONFIG HELP returns an array reply of the configuration name and value. {{< / highlight >}}
+## 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/" >}}) diff --git a/content/commands/ft.config-set.md b/content/commands/ft.config-set.md index 3b636225f4..a38f3a8a1b 100644 --- a/content/commands/ft.config-set.md +++ b/content/commands/ft.config-set.md @@ -62,10 +62,6 @@ is name of the configuration option, or '*' for all. is value of the configuration option. -## Return - -FT.CONFIG SET returns a simple string reply `OK` if executed correctly, or an error reply otherwise. - ## Examples
@@ -77,6 +73,24 @@ OK {{< / highlight >}}
+## 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/" >}}) diff --git a/content/commands/ft.create.md b/content/commands/ft.create.md index f7a4480cd6..2d394fa424 100644 --- a/content/commands/ft.create.md +++ b/content/commands/ft.create.md @@ -403,10 +403,6 @@ if set, does not scan and index. -## Return - -FT.CREATE returns a simple string reply `OK` if executed correctly, or an error reply otherwise. - ## Examples
@@ -463,6 +459,24 @@ The following example uses data similar to the hash examples above but uses JSON {{< / highlight >}}
+## Return information + +{{< multitabs id="ft-create-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 already exists, 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: index already exists, invalid schema syntax. + +{{< /multitabs >}} + ## See also [`FT.ALTER`]({{< relref "commands/ft.alter/" >}}) | [`FT.DROPINDEX`]({{< relref "commands/ft.dropindex/" >}}) diff --git a/content/commands/ft.cursor-del.md b/content/commands/ft.cursor-del.md index 43b416fe35..8e5ca4f52e 100644 --- a/content/commands/ft.cursor-del.md +++ b/content/commands/ft.cursor-del.md @@ -52,10 +52,6 @@ is index name. is id of the cursor. -## Returns - -FT.CURSOR DEL returns a simple string reply `OK` if executed correctly, or an error reply otherwise. - ## Examples
@@ -74,6 +70,24 @@ Check that the cursor is deleted. {{< / highlight >}}
+## Return information + +{{< multitabs id="ft-cursor-del-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: cursor 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: cursor does not exist. + +{{< /multitabs >}} + ## See also [`FT.CURSOR READ`]({{< relref "commands/ft.cursor-read/" >}}) diff --git a/content/commands/ft.cursor-read.md b/content/commands/ft.cursor-read.md index 9bd8921132..2a9412e056 100644 --- a/content/commands/ft.cursor-read.md +++ b/content/commands/ft.cursor-read.md @@ -64,10 +64,6 @@ is id of the cursor. is number of results to read. This parameter overrides `COUNT` specified in [`FT.AGGREGATE`]({{< relref "commands/ft.aggregate/" >}}). -## Return - -FT.CURSOR READ returns an array reply where each row is an array reply and represents a single aggregate result. - ## Examples
@@ -78,6 +74,24 @@ FT.CURSOR READ returns an array reply where each row is an array reply and repre {{< / highlight >}}
+## Return information + +{{< multitabs id="ft-cursor-read-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +One of the following: +* [Array]({{< relref "/develop/reference/protocol-spec#arrays" >}}) with search results and metadata. +* [Simple error reply]({{< relref "/develop/reference/protocol-spec#simple-errors" >}}) in these cases: cursor not found. + +-tab-sep- + +One of the following: +* [Map]({{< relref "/develop/reference/protocol-spec#maps" >}}) with structured search results and metadata. +* [Simple error reply]({{< relref "/develop/reference/protocol-spec#simple-errors" >}}) in these cases: cursor not found. + +{{< /multitabs >}} + ## See also [`FT.CURSOR DEL`]({{< relref "commands/ft.cursor-del/" >}}) | [`FT.AGGREGATE`]({{< relref "commands/ft.aggregate/" >}}) diff --git a/content/commands/ft.dictadd.md b/content/commands/ft.dictadd.md index 24fece3178..a50def4343 100644 --- a/content/commands/ft.dictadd.md +++ b/content/commands/ft.dictadd.md @@ -52,10 +52,6 @@ is dictionary name. term to add to the dictionary. -## Return - -FT.DICTADD returns an integer reply, the number of new terms that were added. - ## Examples
@@ -67,6 +63,20 @@ FT.DICTADD returns an integer reply, the number of new terms that were added. {{< / highlight >}}
+## Return information + +{{< multitabs id="ft-dictadd-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Integer reply]({{< relref "/develop/reference/protocol-spec#integers" >}}): the number of new terms added to the dictionary. + +-tab-sep- + +[Integer reply]({{< relref "/develop/reference/protocol-spec#integers" >}}): the number of new terms added to the dictionary. + +{{< /multitabs >}} + ## See also [`FT.DICTDEL`]({{< relref "commands/ft.dictdel/" >}}) | [`FT.DICTDUMP`]({{< relref "commands/ft.dictdump/" >}}) diff --git a/content/commands/ft.dictdel.md b/content/commands/ft.dictdel.md index 8eac485159..df16ef8e63 100644 --- a/content/commands/ft.dictdel.md +++ b/content/commands/ft.dictdel.md @@ -52,10 +52,6 @@ is dictionary name. term to delete from the dictionary. -## Return - -FT.DICTDEL returns an integer reply, the number of new terms that were deleted. - ## Examples
@@ -67,6 +63,20 @@ FT.DICTDEL returns an integer reply, the number of new terms that were deleted. {{< / highlight >}}
+## Return information + +{{< multitabs id="ft-dictdel-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Integer reply]({{< relref "/develop/reference/protocol-spec#integers" >}}): the number of terms deleted from the dictionary. + +-tab-sep- + +[Integer reply]({{< relref "/develop/reference/protocol-spec#integers" >}}): the number of terms deleted from the dictionary. + +{{< /multitabs >}} + ## See also [`FT.DICTADD`]({{< relref "commands/ft.dictadd/" >}}) | [`FT.DICTDUMP`]({{< relref "commands/ft.dictdump/" >}}) diff --git a/content/commands/ft.dictdump.md b/content/commands/ft.dictdump.md index 07ff3ec1a4..aea679fa91 100644 --- a/content/commands/ft.dictdump.md +++ b/content/commands/ft.dictdump.md @@ -45,10 +45,6 @@ Dump all terms in the given dictionary is dictionary name. -## Return - -FT.DICTDUMP returns an array, where each element is term (string). - ## Examples
@@ -62,6 +58,20 @@ FT.DICTDUMP returns an array, where each element is term (string). {{< / highlight >}}
+## Return information + +{{< multitabs id="ft-dictdump-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Array]({{< relref "/develop/reference/protocol-spec#arrays" >}}) of dictionary terms. + +-tab-sep- + +[Set]({{< relref "/develop/reference/protocol-spec#sets" >}}) of dictionary terms. + +{{< /multitabs >}} + ## See also [`FT.DICTADD`]({{< relref "commands/ft.dictadd/" >}}) | [`FT.DICTDEL`]({{< relref "commands/ft.dictdel/" >}}) diff --git a/content/commands/ft.dropindex.md b/content/commands/ft.dropindex.md index 5c3362eae9..7ad0535472 100644 --- a/content/commands/ft.dropindex.md +++ b/content/commands/ft.dropindex.md @@ -66,10 +66,6 @@ To check the completion of the indexing, use [`FT.INFO`]({{< relref "commands/ft -## Return - -FT.DROPINDEX returns a simple string reply `OK` if executed correctly, or an error reply otherwise. - ## Examples
@@ -81,6 +77,24 @@ OK {{< / highlight >}}
+## Return information + +{{< multitabs id="ft-dropindex-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. + +-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. + +{{< /multitabs >}} + ## See also [`FT.CREATE`]({{< relref "commands/ft.create/" >}}) | [`FT.INFO`]({{< relref "commands/ft.info/" >}}) diff --git a/content/commands/ft.explain.md b/content/commands/ft.explain.md index 997cdeb055..d640c27434 100644 --- a/content/commands/ft.explain.md +++ b/content/commands/ft.explain.md @@ -71,10 +71,6 @@ is dialect version under which to execute the query. If not specified, the query {{% /alert %}} -## Return - -FT.EXPLAIN returns a string representing the execution plan. - ## Examples
@@ -103,6 +99,24 @@ INTERSECT { {{< / highlight >}}
+## Return information + +{{< multitabs id="ft-explain-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +One of the following: +* [Bulk string]({{< relref "/develop/reference/protocol-spec#bulk-strings" >}}) containing the query execution plan. +* [Simple error reply]({{< relref "/develop/reference/protocol-spec#simple-errors" >}}) in these cases: no such index, syntax error in query. + +-tab-sep- + +One of the following: +* [Bulk string]({{< relref "/develop/reference/protocol-spec#bulk-strings" >}}) containing the query execution plan. +* [Simple error reply]({{< relref "/develop/reference/protocol-spec#simple-errors" >}}) in these cases: no such index, syntax error in query. + +{{< /multitabs >}} + ## See also [`FT.CREATE`]({{< relref "commands/ft.create/" >}}) | [`FT.SEARCH`]({{< relref "commands/ft.search/" >}}) | [`FT.CONFIG SET`]({{< relref "commands/ft.config-set/" >}}) diff --git a/content/commands/ft.explaincli.md b/content/commands/ft.explaincli.md index 47c8f62ae3..a11c9cabdc 100644 --- a/content/commands/ft.explaincli.md +++ b/content/commands/ft.explaincli.md @@ -71,10 +71,6 @@ In the returned response, a `+` on a term is an indication of stemming. -## Return - -FT.EXPLAINCLI returns an array reply with a string representing the execution plan. - ## Examples
@@ -116,6 +112,24 @@ $ redis-cli {{< / highlight >}}
+## Return information + +{{< multitabs id="ft-explaincli-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +One of the following: +* [Array]({{< relref "/develop/reference/protocol-spec#arrays" >}}) of [bulk string replies]({{< relref "/develop/reference/protocol-spec#bulk-strings" >}}) containing the query execution plan in CLI format. +* [Simple error reply]({{< relref "/develop/reference/protocol-spec#simple-errors" >}}) in these cases: no such index, syntax error in query. + +-tab-sep- + +One of the following: +* [Array]({{< relref "/develop/reference/protocol-spec#arrays" >}}) of [bulk string replies]({{< relref "/develop/reference/protocol-spec#bulk-strings" >}}) containing the query execution plan in CLI format. +* [Simple error reply]({{< relref "/develop/reference/protocol-spec#simple-errors" >}}) in these cases: no such index, syntax error in query. + +{{< /multitabs >}} + ## See also [`FT.CREATE`]({{< relref "commands/ft.create/" >}}) | [`FT.SEARCH`]({{< relref "commands/ft.search/" >}}) | [`FT.CONFIG SET`]({{< relref "commands/ft.config-set/" >}}) diff --git a/content/commands/ft.info.md b/content/commands/ft.info.md index ab1bb06898..609fa028bc 100644 --- a/content/commands/ft.info.md +++ b/content/commands/ft.info.md @@ -39,10 +39,6 @@ Returns information and statistics about a given index.
is the name of the given index. You must first create the index using [`FT.CREATE`]({{< relref "commands/ft.create/" >}}). -## RESP reply - -`FT.INFO` returns an array reply with pairs of keys and values. - ## Returned values ### General @@ -354,6 +350,24 @@ The next two GC-related fields are relevant in scenarios where simultaneous chan {{< / highlight >}} +## Return information + +{{< multitabs id="ft-info-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +One of the following: +* [Array]({{< relref "/develop/reference/protocol-spec#arrays" >}}) of key-value pairs containing index information and statistics. +* [Simple error reply]({{< relref "/develop/reference/protocol-spec#simple-errors" >}}) in these cases: no such index. + +-tab-sep- + +One of the following: +* [Map]({{< relref "/develop/reference/protocol-spec#maps" >}}) containing index information and statistics as key-value pairs. +* [Simple error reply]({{< relref "/develop/reference/protocol-spec#simple-errors" >}}) in these cases: no such index. + +{{< /multitabs >}} + ## See also [`FT.CREATE`]({{< relref "commands/ft.create/" >}}) | [`FT.SEARCH`]({{< relref "commands/ft.search/" >}}) diff --git a/content/commands/ft.profile.md b/content/commands/ft.profile.md index 552eff5e91..3275179aa2 100644 --- a/content/commands/ft.profile.md +++ b/content/commands/ft.profile.md @@ -90,10 +90,6 @@ is the query string, sent to `FT.SEARCH` or `FT.AGGREGATE`. The second element contains information about query creation, iterator profiles, and result processor profiles. Details of the second element follow in the sections below. -### Results - -This section contains the search results. - ### Per-shard profiles This section contains query execution details for each shard. @@ -399,6 +395,24 @@ Here's an example of running the `FT.PROFILE` command for a vector query. {{< /highlight >}} +## Return information + +{{< multitabs id="ft-profile-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +One of the following: +* [Array]({{< relref "/develop/reference/protocol-spec#arrays" >}}) with two elements: search results and profiling information. +* [Simple error reply]({{< relref "/develop/reference/protocol-spec#simple-errors" >}}) in these cases: no such index, syntax error in query. + +-tab-sep- + +One of the following: +* [Map]({{< relref "/develop/reference/protocol-spec#maps" >}}) with two keys: `Results` containing search results and `Profile` containing profiling information. +* [Simple error reply]({{< relref "/develop/reference/protocol-spec#simple-errors" >}}) in these cases: no such index, syntax error in query. + +{{< /multitabs >}} + ## See also [`FT.SEARCH`]({{< relref "commands/ft.search/" >}}) | [`FT.AGGREGATE`]({{< relref "commands/ft.aggregate/" >}}) diff --git a/content/commands/ft.search.md b/content/commands/ft.search.md index 48d87fc42f..9f3e607f4a 100644 --- a/content/commands/ft.search.md +++ b/content/commands/ft.search.md @@ -852,9 +852,32 @@ Query with `CONTAINS` operator: +## Return information + +{{< multitabs id="ft-search-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 document IDs and their field-value pairs as [arrays]({{< relref "/develop/reference/protocol-spec#arrays" >}}). +* [Simple error reply]({{< relref "/develop/reference/protocol-spec#simple-errors" >}}) in these cases: no such index, syntax error in query. + +-tab-sep- + +One of the following: +* [Map]({{< relref "/develop/reference/protocol-spec#maps" >}}) with the following fields: + - `total_results`: [Integer]({{< relref "/develop/reference/protocol-spec#integers" >}}) - total number of results + - `results`: [Array]({{< relref "/develop/reference/protocol-spec#arrays" >}}) of [maps]({{< relref "/develop/reference/protocol-spec#maps" >}}) containing document information + - `attributes`: [Array]({{< relref "/develop/reference/protocol-spec#arrays" >}}) of attribute names + - `format`: [Simple string]({{< relref "/develop/reference/protocol-spec#simple-strings" >}}) - result format + - `warning`: [Array]({{< relref "/develop/reference/protocol-spec#arrays" >}}) of warning messages +* [Simple error reply]({{< relref "/develop/reference/protocol-spec#simple-errors" >}}) in these cases: no such index, syntax error in query. + +{{< /multitabs >}} + ## See also -[`FT.CREATE`]({{< relref "commands/ft.create/" >}}) | [`FT.AGGREGATE`]({{< relref "commands/ft.aggregate/" >}}) +[`FT.CREATE`]({{< relref "commands/ft.create/" >}}) | [`FT.AGGREGATE`]({{< relref "commands/ft.aggregate/" >}}) ## Related topics diff --git a/content/commands/ft.spellcheck.md b/content/commands/ft.spellcheck.md index f4fbb759e4..de6ffcb210 100644 --- a/content/commands/ft.spellcheck.md +++ b/content/commands/ft.spellcheck.md @@ -132,6 +132,24 @@ The score is calculated by dividing the number of documents in which the suggest {{< / highlight >}} +## Return information + +{{< multitabs id="ft-spellcheck-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +One of the following: +* [Array]({{< relref "/develop/reference/protocol-spec#arrays" >}}) of spell check results for each term. +* [Simple error reply]({{< relref "/develop/reference/protocol-spec#simple-errors" >}}) in these cases: no such index. + +-tab-sep- + +One of the following: +* [Map]({{< relref "/develop/reference/protocol-spec#maps" >}}) with a `results` key containing spell check results for each term. +* [Simple error reply]({{< relref "/develop/reference/protocol-spec#simple-errors" >}}) in these cases: no such index. + +{{< /multitabs >}} + ## See also [`FT.CONFIG SET`]({{< relref "commands/ft.config-set/" >}}) | [`FT.DICTADD`]({{< relref "commands/ft.dictadd/" >}}) | [`FT.DICTDEL`]({{< relref "commands/ft.dictdel/" >}}) | [`FT.DICTDUMP`]({{< relref "commands/ft.dictdump/" >}}) diff --git a/content/commands/ft.sugadd.md b/content/commands/ft.sugadd.md index fa60274413..52538509e5 100644 --- a/content/commands/ft.sugadd.md +++ b/content/commands/ft.sugadd.md @@ -85,10 +85,6 @@ increments the existing entry of the suggestion by the given score, instead of r saves an extra payload with the suggestion, that can be fetched by adding the `WITHPAYLOADS` argument to [`FT.SUGGET`]({{< relref "commands/ft.sugget/" >}}). -## Return - -FT.SUGADD returns an integer reply, which is the current size of the suggestion dictionary. - ## Examples
@@ -100,6 +96,20 @@ FT.SUGADD returns an integer reply, which is the current size of the suggestion {{< / highlight >}}
+## Return information + +{{< multitabs id="ft-sugadd-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Integer reply]({{< relref "/develop/reference/protocol-spec#integers" >}}): number of elements added to the suggestion dictionary. + +-tab-sep- + +[Integer reply]({{< relref "/develop/reference/protocol-spec#integers" >}}): number of elements added to the suggestion dictionary. + +{{< /multitabs >}} + ## See also [`FT.SUGGET`]({{< relref "commands/ft.sugget/" >}}) | [`FT.SUGDEL`]({{< relref "commands/ft.sugdel/" >}}) | [`FT.SUGLEN`]({{< relref "commands/ft.suglen/" >}}) diff --git a/content/commands/ft.sugdel.md b/content/commands/ft.sugdel.md index 0288dc0541..5db1fd767e 100644 --- a/content/commands/ft.sugdel.md +++ b/content/commands/ft.sugdel.md @@ -52,10 +52,6 @@ is suggestion dictionary key. is suggestion string to index. -## Return - -FT.SUGDEL returns an integer reply, 1 if the string was found and deleted, 0 otherwise. - ## Examples
@@ -69,6 +65,20 @@ FT.SUGDEL returns an integer reply, 1 if the string was found and deleted, 0 oth {{< / highlight >}}
+## Return information + +{{< multitabs id="ft-sugdel-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Integer reply]({{< relref "/develop/reference/protocol-spec#integers" >}}): 1 if the suggestion was deleted, 0 if it was not found. + +-tab-sep- + +[Integer reply]({{< relref "/develop/reference/protocol-spec#integers" >}}): 1 if the suggestion was deleted, 0 if it was not found. + +{{< /multitabs >}} + ## See also [`FT.SUGGET`]({{< relref "commands/ft.sugget/" >}}) | [`FT.SUGADD`]({{< relref "commands/ft.sugadd/" >}}) | [`FT.SUGLEN`]({{< relref "commands/ft.suglen/" >}}) diff --git a/content/commands/ft.sugget.md b/content/commands/ft.sugget.md index 12d37ba881..967cdb4ac0 100644 --- a/content/commands/ft.sugget.md +++ b/content/commands/ft.sugget.md @@ -110,6 +110,20 @@ FT.SUGGET returns an array reply, which is a list of the top suggestions matchin {{< / highlight >}} +## Return information + +{{< multitabs id="ft-sugget-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Array]({{< relref "/develop/reference/protocol-spec#arrays" >}}) of the top suggestions matching the prefix, optionally with a score after each entry. + +-tab-sep- + +[Array]({{< relref "/develop/reference/protocol-spec#arrays" >}}) of the top suggestions matching the prefix, optionally with a score after each entry. + +{{< /multitabs >}} + ## See also [`FT.SUGADD`]({{< relref "commands/ft.sugadd/" >}}) | [`FT.SUGDEL`]({{< relref "commands/ft.sugdel/" >}}) | [`FT.SUGLEN`]({{< relref "commands/ft.suglen/" >}}) diff --git a/content/commands/ft.suglen.md b/content/commands/ft.suglen.md index b583f17bed..ea2eb033d9 100644 --- a/content/commands/ft.suglen.md +++ b/content/commands/ft.suglen.md @@ -43,10 +43,6 @@ Get the size of an auto-complete suggestion dictionary is suggestion dictionary key. -## Return - -FT.SUGLEN returns an integer reply, which is the current size of the suggestion dictionary. - ## Examples
@@ -58,6 +54,20 @@ FT.SUGLEN returns an integer reply, which is the current size of the suggestion {{< / highlight >}}
+## Return information + +{{< multitabs id="ft-suglen-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Integer reply]({{< relref "/develop/reference/protocol-spec#integers" >}}): number of suggestions in the dictionary. + +-tab-sep- + +[Integer reply]({{< relref "/develop/reference/protocol-spec#integers" >}}): number of suggestions in the dictionary. + +{{< /multitabs >}} + ## See also [`FT.SUGADD`]({{< relref "commands/ft.sugadd/" >}}) | [`FT.SUGDEL`]({{< relref "commands/ft.sugdel/" >}}) | [`FT.SUGGET`]({{< relref "commands/ft.sugget/" >}}) diff --git a/content/commands/ft.syndump.md b/content/commands/ft.syndump.md index 84aeed93ed..7f16b2cd5a 100644 --- a/content/commands/ft.syndump.md +++ b/content/commands/ft.syndump.md @@ -45,10 +45,6 @@ is index name. Use FT.SYNDUMP to dump the synonyms data structure. This command returns a list of synonym terms and their synonym group ids. -## Return - -FT.SYNDUMP returns an array reply, with a pair of `term` and an array of synonym groups. - ## Examples
@@ -66,6 +62,24 @@ FT.SYNDUMP returns an array reply, with a pair of `term` and an array of synonym {{< / highlight >}}
+## Return information + +{{< multitabs id="ft-syndump-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +One of the following: +* [Array]({{< relref "/develop/reference/protocol-spec#arrays" >}}) of synonym terms and their associated synonym groups. +* [Simple error reply]({{< relref "/develop/reference/protocol-spec#simple-errors" >}}) in these cases: no such index. + +-tab-sep- + +One of the following: +* [Map]({{< relref "/develop/reference/protocol-spec#maps" >}}) where keys are synonym terms and values are arrays of their associated synonym groups. +* [Simple error reply]({{< relref "/develop/reference/protocol-spec#simple-errors" >}}) in these cases: no such index. + +{{< /multitabs >}} + ## See also [`FT.SYNUPDATE`]({{< relref "commands/ft.synupdate/" >}}) diff --git a/content/commands/ft.synupdate.md b/content/commands/ft.synupdate.md index ccc347a1c7..588f323b64 100644 --- a/content/commands/ft.synupdate.md +++ b/content/commands/ft.synupdate.md @@ -68,10 +68,6 @@ Use FT.SYNUPDATE to create or update a synonym group with additional terms. The does not scan and index, and only documents that are indexed after the update are affected. -## Return - -FT.SYNUPDATE returns a simple string reply `OK` if executed correctly, or an error reply otherwise. - ## Examples
@@ -88,6 +84,24 @@ OK {{< / highlight >}}
+## Return information + +{{< multitabs id="ft-synupdate-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. + +-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. + +{{< /multitabs >}} + ## See also [`FT.SYNDUMP`]({{< relref "commands/ft.syndump/" >}}) diff --git a/content/commands/ft.tagvals.md b/content/commands/ft.tagvals.md index 1a58aa11ce..59b17b51c2 100644 --- a/content/commands/ft.tagvals.md +++ b/content/commands/ft.tagvals.md @@ -65,10 +65,6 @@ Use FT.TAGVALS if your tag indexes things like cities, categories, and so on. FT.TAGVALS provides no paging or sorting, and the tags are not alphabetically sorted. FT.TAGVALS only operates on [tag fields]({{< relref "/develop/ai/search-and-query/advanced-concepts/tags" >}}). The returned strings are lowercase with whitespaces removed, but otherwise unchanged. -## Return - -FT.TAGVALS returns an array reply of all distinct tags in the tag index. - ## Examples
@@ -81,9 +77,27 @@ FT.TAGVALS returns an array reply of all distinct tags in the tag index. {{< / highlight >}}
+## Return information + +{{< multitabs id="ft-tagvals-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +One of the following: +* [Array]({{< relref "/develop/reference/protocol-spec#arrays" >}}) of distinct tag values as [bulk strings]({{< relref "/develop/reference/protocol-spec#bulk-strings" >}}). +* [Simple error reply]({{< relref "/develop/reference/protocol-spec#simple-errors" >}}) in these cases: no such index, not a tag field. + +-tab-sep- + +One of the following: +* [Set]({{< relref "/develop/reference/protocol-spec#sets" >}}) of distinct tag values as [bulk strings]({{< relref "/develop/reference/protocol-spec#bulk-strings" >}}). +* [Simple error reply]({{< relref "/develop/reference/protocol-spec#simple-errors" >}}) in these cases: no such index, not a tag field. + +{{< /multitabs >}} + ## See also -[`FT.CREATE`]({{< relref "commands/ft.create/" >}}) +[`FT.CREATE`]({{< relref "commands/ft.create/" >}}) ## Related topics