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

Method synupdate

redis/commands/search/commands.py:1706–1728  ·  view source on GitHub ↗

Updates a synonym group. The command is used to create or update a synonym group with additional terms. Only documents which were indexed after the update will be affected. Parameters: groupid : Synonym group id. skipinitial : bo

(self, groupid: str, skipinitial: bool = False, *terms: List[str])

Source from the content-addressed store, hash-verified

1704 return [s for s in parser]
1705
1706 def synupdate(self, groupid: str, skipinitial: bool = False, *terms: List[str]):
1707 """
1708 Updates a synonym group.
1709 The command is used to create or update a synonym group with
1710 additional terms.
1711 Only documents which were indexed after the update will be affected.
1712
1713 Parameters:
1714
1715 groupid :
1716 Synonym group id.
1717 skipinitial : bool
1718 If set to true, we do not scan and index.
1719 terms :
1720 The terms.
1721
1722 For more information see `FT.SYNUPDATE <https://redis.io/commands/ft.synupdate>`_.
1723 """ # noqa
1724 cmd = [SYNUPDATE_CMD, self.index_name, groupid]
1725 if skipinitial:
1726 cmd.extend(["SKIPINITIALSCAN"])
1727 cmd.extend(terms)
1728 return self.execute_command(*cmd)
1729
1730 def syndump(self):
1731 """

Callers 2

test_synupdateMethod · 0.80
test_syndumpMethod · 0.80

Calls 2

extendMethod · 0.45
execute_commandMethod · 0.45

Tested by 2

test_synupdateMethod · 0.64
test_syndumpMethod · 0.64