Skip to content

Commit f2a2c37

Browse files
committed
Decoding on RESP3 is required
1 parent 0568afa commit f2a2c37

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

redis/commands/search/commands.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -500,7 +500,11 @@ def search(
500500
""" # noqa
501501
args, query = self._mk_query_args(query, query_params=query_params)
502502
st = time.time()
503-
options = {NEVER_DECODE: True}
503+
504+
options = {}
505+
if get_protocol_version(self.client) not in ["3", 3]:
506+
options[NEVER_DECODE] = True
507+
504508
res = self.execute_command(SEARCH_CMD, *args, **options)
505509

506510
if isinstance(res, Pipeline):
@@ -928,7 +932,11 @@ async def search(
928932
""" # noqa
929933
args, query = self._mk_query_args(query, query_params=query_params)
930934
st = time.time()
931-
options = {NEVER_DECODE: True}
935+
936+
options = {}
937+
if get_protocol_version(self.client) not in ["3", 3]:
938+
options[NEVER_DECODE] = True
939+
932940
res = await self.execute_command(SEARCH_CMD, *args, **options)
933941

934942
if isinstance(res, Pipeline):

0 commit comments

Comments
 (0)