content/commands/ft.aliasadd.md
Add an alias to an index
is alias to be added to an index.
</details>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.
Add an alias to an index.
{{< highlight bash >}} 127.0.0.1:6379> FT.ALIASADD alias idx OK {{< / highlight >}}
Attempting to add the same alias returns a message that the alias already exists.
{{< highlight bash >}} 127.0.0.1:6379> FT.ALIASADD alias idx (error) Alias already exists {{< / highlight >}}
</details>| 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> | |
{{< multitabs id="ft-aliasadd-return-info" tab1="RESP2" tab2="RESP3" >}}
One of the following:
OK if executed correctly.-tab-sep-
One of the following:
OK if executed correctly.{{< /multitabs >}}
[FT.ALIASDEL]({{< relref "commands/ft.aliasdel/" >}}) | [FT.ALIASUPDATE]({{< relref "commands/ft.aliasupdate/" >}})