Skip to content

Commit 47b5dd0

Browse files
authored
change drop to dropindex (#2315)
1 parent e601aa7 commit 47b5dd0

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

redis/commands/search/commands.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
ADD_CMD = "FT.ADD"
2121
ADDHASH_CMD = "FT.ADDHASH"
2222
DROP_CMD = "FT.DROP"
23+
DROPINDEX_CMD = "FT.DROPINDEX"
2324
EXPLAIN_CMD = "FT.EXPLAIN"
2425
EXPLAINCLI_CMD = "FT.EXPLAINCLI"
2526
DEL_CMD = "FT.DEL"
@@ -170,8 +171,8 @@ def dropindex(self, delete_documents=False):
170171
171172
For more information see `FT.DROPINDEX <https://redis.io/commands/ft.dropindex>`_.
172173
""" # noqa
173-
keep_str = "" if delete_documents else "KEEPDOCS"
174-
return self.execute_command(DROP_CMD, self.index_name, keep_str)
174+
delete_str = "DD" if delete_documents else ""
175+
return self.execute_command(DROPINDEX_CMD, self.index_name, delete_str)
175176

176177
def _add_document(
177178
self,

0 commit comments

Comments
 (0)