FT.ALIASADD

Available in:
Redis Stack / Search 1.0.0
Time complexity:
O(1)

Add an alias to an index

Syntax

FT.ALIASADD alias index

Examples

Required parameters

alias index

is alias to be added to an index.

Indexes can have more than one alias, but an alias cannot refer to another alias.

FT.ALISSADD allows administrators to transparently redirect application queries to alternative indexes.

Return

FT.ALIASADD returns a simple string reply OK if executed correctly, or an error reply otherwise.

Examples

Add an alias to an index

Add an alias to an index.

127.0.0.1:6379> FT.ALIASADD alias idx
OK

Attempting to add the same alias returns a message that the alias already exists.

127.0.0.1:6379> FT.ALIASADD alias idx
(error) Alias already exists

See also

FT.ALIASDEL | FT.ALIASUPDATE

RediSearch

Feedback

If you've found issues on this page, or have suggestions for improvement, please submit a request to merge or open an issue in the repository.