Skip to content

Marks old RediSearch 1.0 commands as deprecated #3606

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions redis/commands/search/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
SEARCH_CMD = "FT.SEARCH"
ADD_CMD = "FT.ADD"
ADDHASH_CMD = "FT.ADDHASH"
DROP_CMD = "FT.DROP"
DROPINDEX_CMD = "FT.DROPINDEX"
EXPLAIN_CMD = "FT.EXPLAIN"
EXPLAINCLI_CMD = "FT.EXPLAINCLI"
Expand All @@ -35,7 +34,6 @@
DICT_ADD_CMD = "FT.DICTADD"
DICT_DEL_CMD = "FT.DICTDEL"
DICT_DUMP_CMD = "FT.DICTDUMP"
GET_CMD = "FT.GET"
MGET_CMD = "FT.MGET"
CONFIG_CMD = "FT.CONFIG"
TAGVALS_CMD = "FT.TAGVALS"
Expand Down Expand Up @@ -406,6 +404,9 @@ def add_document_hash(self, doc_id, score=1.0, language=None, replace=False):
doc_id, conn=None, score=score, language=language, replace=replace
)

@deprecated_function(
version="2.0.0", reason="deprecated since redisearch 2.0"
)
def delete_document(self, doc_id, conn=None, delete_actual_document=False):
"""
Delete a document from index
Expand Down Expand Up @@ -440,6 +441,9 @@ def load_document(self, id):

return Document(id=id, **fields)

@deprecated_function(
version="2.0.0", reason="deprecated since redisearch 2.0"
)
def get(self, *ids):
"""
Returns the full contents of multiple documents.
Expand Down
Loading