MCPcopy
hub / github.com/redis/redis-py / aliasadd

Method aliasadd

redis/commands/search/commands.py:1572–1583  ·  view source on GitHub ↗

Alias a search index - will fail if alias already exists ### Parameters - **alias**: Name of the alias to create For more information see `FT.ALIASADD <https://redis.io/commands/ft.aliasadd>`_.

(self, alias: str)

Source from the content-addressed store, hash-verified

1570 return self.execute_command(TAGVALS_CMD, self.index_name, tagfield)
1571
1572 def aliasadd(self, alias: str):
1573 """
1574 Alias a search index - will fail if alias already exists
1575
1576 ### Parameters
1577
1578 - **alias**: Name of the alias to create
1579
1580 For more information see `FT.ALIASADD <https://redis.io/commands/ft.aliasadd>`_.
1581 """ # noqa
1582
1583 return self.execute_command(ALIAS_ADD_CMD, alias, self.index_name)
1584
1585 def aliasupdate(self, alias: str):
1586 """

Callers 4

test_aliasMethod · 0.80
test_alias_basicMethod · 0.80
test_aliasMethod · 0.80
test_alias_basicMethod · 0.80

Calls 1

execute_commandMethod · 0.45

Tested by 4

test_aliasMethod · 0.64
test_alias_basicMethod · 0.64
test_aliasMethod · 0.64
test_alias_basicMethod · 0.64