FT.ALIASADD
Syntax
FT.ALIASADD alias index
- Available in:
- Redis Open Source / Search 1.0.0
- Time complexity:
- O(1)
- ACL categories:
-
@search, - Compatibility:
- Redis Software and Redis Cloud compatibility
Add an alias to an index
Required arguments
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.ALIASADD allows administrators to transparently redirect application queries to alternative indexes.
Examples
Add an alias to an index
Add an alias to an index.
127.0.0.1:6379> FT.ALIASADD alias idx
OKAttempting 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 existsRedis Software and Redis Cloud compatibility
| Redis Enterprise Software |
Redis Cloud Flexible & Annual |
Redis Cloud Free & Fixed |
Notes |
|---|---|---|---|
| ✅ Supported | ✅ Supported | ✅ Supported |
Return information
One of the following:
- Simple string reply:
OKif executed correctly. - Simple error reply in these cases: alias already exists, index does not exist.