From 9a460c8e4f5e22f3ba92bf77b016aaad0b5621fb Mon Sep 17 00:00:00 2001 From: dvora-h <67596500+dvora-h@users.noreply.github.com> Date: Mon, 24 Oct 2022 17:44:13 +0300 Subject: Deprecate `add_doccument` (FT.ADD) (#2425) * deprecate add_doccuments * linters * linters * async tests --- redis/commands/search/commands.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'redis') diff --git a/redis/commands/search/commands.py b/redis/commands/search/commands.py index ba9d9bc..ceca20f 100644 --- a/redis/commands/search/commands.py +++ b/redis/commands/search/commands.py @@ -2,6 +2,8 @@ import itertools import time from typing import Dict, Optional, Union +from deprecated import deprecated + from redis.client import Pipeline from ..helpers import parse_to_dict @@ -236,6 +238,9 @@ class SearchCommands: return self.execute_command(*args) + @deprecated( + version="2.0.0", reason="deprecated since redisearch 2.0, call hset instead" + ) def add_document( self, doc_id, @@ -289,6 +294,9 @@ class SearchCommands: **fields, ) + @deprecated( + version="2.0.0", reason="deprecated since redisearch 2.0, call hset instead" + ) def add_document_hash(self, doc_id, score=1.0, language=None, replace=False): """ Add a hash document to the index. -- cgit v1.2.1