Skip to content

Commit e577cda

Browse files
committed
Reverting some of the changes, causing issues with seach commands executed through search pipelines
1 parent 57e8173 commit e577cda

File tree

2 files changed

+1
-47
lines changed

2 files changed

+1
-47
lines changed

redis/commands/search/__init__.py

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -184,14 +184,6 @@ def pipeline(self, transaction=True, shard_hint=None):
184184
class Pipeline(SearchCommands, RedisPipeline):
185185
"""Pipeline for the module."""
186186

187-
def __init__(self, connection_pool, response_callbacks, transaction, shard_hint):
188-
super().__init__(connection_pool, response_callbacks, transaction, shard_hint)
189-
self.index_name: str = ""
190187

191-
192-
class AsyncPipeline(AsyncSearchCommands, AsyncioPipeline):
188+
class AsyncPipeline(AsyncSearchCommands, AsyncioPipeline, Pipeline):
193189
"""AsyncPipeline for the module."""
194-
195-
def __init__(self, connection_pool, response_callbacks, transaction, shard_hint):
196-
super().__init__(connection_pool, response_callbacks, transaction, shard_hint)
197-
self.index_name: str = ""

redis/commands/search/commands.py

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -64,44 +64,6 @@
6464
class SearchCommands:
6565
"""Search commands."""
6666

67-
@property
68-
def index_name(self) -> str:
69-
"""The name of the search index. Must be implemented by inheriting classes."""
70-
if not hasattr(self, "_index_name"):
71-
raise AttributeError("index_name must be set by the inheriting class")
72-
return self._index_name
73-
74-
@index_name.setter
75-
def index_name(self, value: str) -> None:
76-
"""Set the name of the search index."""
77-
self._index_name = value
78-
79-
@property
80-
def client(self):
81-
"""The Redis client. Must be provided by inheriting classes."""
82-
if not hasattr(self, "_client"):
83-
raise AttributeError("client must be set by the inheriting class")
84-
return self._client
85-
86-
@client.setter
87-
def client(self, value) -> None:
88-
"""Set the Redis client."""
89-
self._client = value
90-
91-
@property
92-
def _RESP2_MODULE_CALLBACKS(self):
93-
"""Response callbacks for RESP2. Must be provided by inheriting classes."""
94-
if not hasattr(self, "_resp2_module_callbacks"):
95-
raise AttributeError(
96-
"_RESP2_MODULE_CALLBACKS must be set by the inheriting class"
97-
)
98-
return self._resp2_module_callbacks
99-
100-
@_RESP2_MODULE_CALLBACKS.setter
101-
def _RESP2_MODULE_CALLBACKS(self, value) -> None:
102-
"""Set the RESP2 module callbacks."""
103-
self._resp2_module_callbacks = value
104-
10567
def _parse_results(self, cmd, res, **kwargs):
10668
if get_protocol_version(self.client) in ["3", 3]:
10769
return ProfileInformation(res) if cmd == "FT.PROFILE" else res

0 commit comments

Comments
 (0)