summaryrefslogtreecommitdiff
path: root/redis
diff options
context:
space:
mode:
authordvora-h <67596500+dvora-h@users.noreply.github.com>2022-10-24 17:44:13 +0300
committerGitHub <noreply@github.com>2022-10-24 17:44:13 +0300
commit9a460c8e4f5e22f3ba92bf77b016aaad0b5621fb (patch)
treede5bdf59518d928f0e720a380db81cb745cf907c /redis
parentd95e004328666948753985620f636dc33ee21022 (diff)
downloadredis-py-9a460c8e4f5e22f3ba92bf77b016aaad0b5621fb.tar.gz
Deprecate `add_doccument` (FT.ADD) (#2425)
* deprecate add_doccuments * linters * linters * async tests
Diffstat (limited to 'redis')
-rw-r--r--redis/commands/search/commands.py8
1 files changed, 8 insertions, 0 deletions
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.