diff --git a/pyes/query.py b/pyes/query.py index ec8b534d..d7d951f4 100644 --- a/pyes/query.py +++ b/pyes/query.py @@ -115,6 +115,7 @@ def __init__(self, self.index_boost = index_boost self.min_score = min_score self.stats = stats + self.bulk_read = None def get_facet_factory(self): """ diff --git a/pyes/rivers.py b/pyes/rivers.py index 618f5c35..5ea5456e 100644 --- a/pyes/rivers.py +++ b/pyes/rivers.py @@ -102,7 +102,9 @@ def serialize(self): class CouchDBRiver(River): type = "couchdb" - def __init__(self, host="localhost", port=5984, db="mydb", filter=None, filter_params=None, script=None, **kwargs): + def __init__(self, host="localhost", port=5984, db="mydb", filter=None, + filter_params=None, script=None, user=None, password=None, + **kwargs): super(CouchDBRiver, self).__init__(**kwargs) self.host = host self.port = port @@ -110,6 +112,8 @@ def __init__(self, host="localhost", port=5984, db="mydb", filter=None, filter_p self.filter = filter self.filter_params = filter_params self.script = script + self.user = user + self.password = password def serialize(self): result = { @@ -125,4 +129,8 @@ def serialize(self): result[self.type]["filter_params"] = self.filter_params if self.script is not None: result[self.type]["script"] = self.script + if self.user is not None: + result[self.type]["user"] = self.user + if self.password is not None: + result[self.type]["password"] = self.password return result