Alter the existing search index by adding new fields. The index must already exist. ### Parameters: - **fields**: a list of Field objects to add for the index For more information see `FT.ALTER <https://redis.io/commands/ft.alter>`_.
(self, fields: Union[Field, List[Field]])
| 971 | return self.execute_command(*args) |
| 972 | |
| 973 | def alter_schema_add(self, fields: Union[Field, List[Field]]): |
| 974 | """ |
| 975 | Alter the existing search index by adding new fields. The index |
| 976 | must already exist. |
| 977 | |
| 978 | ### Parameters: |
| 979 | |
| 980 | - **fields**: a list of Field objects to add for the index |
| 981 | |
| 982 | For more information see `FT.ALTER <https://redis.io/commands/ft.alter>`_. |
| 983 | """ # noqa |
| 984 | |
| 985 | args = [ALTER_CMD, self.index_name, "SCHEMA", "ADD"] |
| 986 | try: |
| 987 | args += list(itertools.chain(*(f.redis_args() for f in fields))) |
| 988 | except TypeError: |
| 989 | args += fields.redis_args() |
| 990 | |
| 991 | return self.execute_command(*args) |
| 992 | |
| 993 | def dropindex(self, delete_documents: bool = False): |
| 994 | """ |