Back to Redis

FT.SYNDUMP

content/commands/ft.syndump.md

latest1.8 KB
Original Source

Dump the contents of a synonym group

Examples

Required arguments

<details open> <summary><code>index</code></summary>

is index name.

</details>

Use FT.SYNDUMP to dump the synonyms data structure. This command returns a list of synonym terms and their synonym group ids.

Examples

<details open> <summary><b>Return the contents of a synonym group</b></summary>

{{< highlight bash >}} 127.0.0.1:6379> FT.SYNDUMP idx

  1. "shalom"
    1. "synonym1"
    2. "synonym2"
  2. "hi"
    1. "synonym1"
  3. "hello"
    1. "synonym1" {{< / highlight >}}
</details>

Redis Software and Redis Cloud compatibility

| Redis Software | Redis Cloud Flexible & Annual | Redis Cloud Free & Fixed | <span style="min-width: 9em; display: table-cell">Notes</span> | |:----------------------|:-----------------|:-----------------|:------| | <span title="Supported">✅ Supported</span> | <span title="Supported">✅ Supported</span> | <span title="Supported">✅ Supported</nobr></span> | |

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

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