Back to Redis

FT.SUGDEL

content/commands/ft.sugdel.md

latest1.7 KB
Original Source

Delete a string from a suggestion index

Examples

Required arguments

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

is suggestion dictionary key.

</details> <details open> <summary><code>string</code></summary>

is suggestion string to index.

</details>

Examples

<details open> <summary><b>Delete a string from a suggestion index</b></summary>

{{< highlight bash >}} 127.0.0.1:6379> FT.SUGDEL sug "hello" (integer) 1 127.0.0.1:6379> FT.SUGDEL sug "hello" (integer) 0 {{< / 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-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/" >}})

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