Skip to content

Implement FT.DICTADD, FT.DICTDEL, and FT.DICTDUMP #5963

@vyavdoshenko

Description

@vyavdoshenko

A set of dictionary management commands - FT.DICTADD, FT.DICTDEL, and FT.DICTDUMP - allows users to create, modify, and inspect user-defined dictionaries.
These dictionaries are essential for advanced text processing use cases such as synonym management, morphological normalization, and autocomplete term handling.

Currently, Dragonfly does not implement these commands, which limits compatibility with features (such as FT.SYNADD and FT.SYNUPDATE).

Expected behavior:

FT.DICTADD [term2 ...]

  • Adds one or more terms to the given dictionary.
  • If the dictionary does not exist, it is created automatically.
  • Returns the number of newly added terms (duplicates are ignored).

FT.DICTDEL [term2 ...]

  • Removes one or more terms from the specified dictionary.
  • Returns the number of terms actually removed.

FT.DICTDUMP

  • Returns all terms currently stored in the dictionary as an array of strings.

Use cases:

  • Build custom synonym or keyword dictionaries for full-text search.
  • Support FT.SYNADD / FT.SYNUPDATE synonym groups using predefined term sets.
  • Maintain specialized vocabularies for domain-specific search logic.

Also should be related to: FT.SUGADD, FT.SUGGET, FT.SUGDEL, FT.SUGLEN

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions