Skip to content

Commit

Permalink
change drop to dropindex (#2315)
Browse files Browse the repository at this point in the history
  • Loading branch information
dvora-h authored Aug 2, 2022
1 parent e601aa7 commit 47b5dd0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions redis/commands/search/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
ADD_CMD = "FT.ADD"
ADDHASH_CMD = "FT.ADDHASH"
DROP_CMD = "FT.DROP"
DROPINDEX_CMD = "FT.DROPINDEX"
EXPLAIN_CMD = "FT.EXPLAIN"
EXPLAINCLI_CMD = "FT.EXPLAINCLI"
DEL_CMD = "FT.DEL"
Expand Down Expand Up @@ -170,8 +171,8 @@ def dropindex(self, delete_documents=False):
For more information see `FT.DROPINDEX <https://redis.io/commands/ft.dropindex>`_.
""" # noqa
keep_str = "" if delete_documents else "KEEPDOCS"
return self.execute_command(DROP_CMD, self.index_name, keep_str)
delete_str = "DD" if delete_documents else ""
return self.execute_command(DROPINDEX_CMD, self.index_name, delete_str)

def _add_document(
self,
Expand Down

0 comments on commit 47b5dd0

Please sign in to comment.