Skip to content

Commit bc3436e

Browse files
authored
add password to init func (#58)
1 parent 86085d7 commit bc3436e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

redisearch/client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ def commit(self):
163163
self.pipeline.execute()
164164
self.current_chunk = 0
165165

166-
def __init__(self, index_name, host='localhost', port=6379, conn=None):
166+
def __init__(self, index_name, host='localhost', port=6379, conn=None, password=None):
167167
"""
168168
Create a new Client for the given index_name, and optional host and port
169169
@@ -173,7 +173,7 @@ def __init__(self, index_name, host='localhost', port=6379, conn=None):
173173
self.index_name = index_name
174174

175175
self.redis = conn if conn is not None else Redis(
176-
connection_pool=ConnectionPool(host=host, port=port))
176+
connection_pool=ConnectionPool(host=host, port=port, password=password))
177177

178178
def batch_indexer(self, chunk_size=100):
179179
"""

0 commit comments

Comments
 (0)