FT.SYNDUMP

Since 1.1.0Search

Syntax

FT.SYNDUMP index
  • ACL categories: @read, @search, @slow
  • Arity: -1

Returns the synonym groups of an index, made with FT.SYNUPDATE, turned around: each word, followed by the groups it is in. Use it to check which words a query word will be widened to; see Synonyms.

  • Words are listed sorted, in lower case.
  • A word in several groups lists them all. A query word matches only the words of its own groups: lamp below reaches light, but not bulb.
  • index may be an alias.

Reply

A flat array: a word, then an array of its group ids, for each word. An empty array if the index has no synonym groups.

Errors

  • SEARCH_INDEX_NOT_FOUND Index not found: <index>: no such index.

Examples

> FT.SYNDUMP products
(empty array)
> FT.SYNUPDATE products g1 lamp light
OK
> FT.SYNUPDATE products g2 light bulb
OK
> FT.SYNDUMP products
1) "bulb"
2) 1) "g2"
3) "lamp"
4) 1) "g1"
5) "light"
6) 1) "g1"
   2) "g2"