Back to Redis

FT.SUGLEN

content/commands/ft.suglen.md

latest1.5 KB
Original Source

Get the size of an auto-complete suggestion dictionary

Examples

Required arguments

<details open> <summary><code>key</code></summary>

is suggestion dictionary key.

</details>

Examples

<details open> <summary><b>Get the size of an auto-complete suggestion dictionary</b></summary>

{{< highlight bash >}} 127.0.0.1:6379> FT.SUGLEN sug (integer) 2 {{< / highlight >}}

</details>

Redis Software and Redis Cloud compatibility

| Redis Software | Redis Cloud | <span style="min-width: 9em; display: table-cell">Notes</span> | |:----------------------|:-----------------|:------| | <span title="Supported">✅ Standard</span> <span title="Not supported"><nobr>❌ Active-Active</nobr></span> | <span title="Not supported">❌ Standard</span> <span title="Not supported"><nobr>❌ Active-Active</nobr></span> | Not supported on clustered databases. |

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/" >}})

[RediSearch]({{< relref "/develop/ai/search-and-query/" >}})