From 8f394203152dee63cfc659d468e122c6152246e9 Mon Sep 17 00:00:00 2001 From: sirex Date: Sun, 19 Feb 2012 14:57:07 +0200 Subject: [PATCH 1/2] Added HTTPAuth parameters to CouchDBRiver. --- pyes/rivers.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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 From 932468b4b4e5b4de441830546ccb32482df15613 Mon Sep 17 00:00:00 2001 From: sirex Date: Sun, 19 Feb 2012 16:34:07 +0200 Subject: [PATCH 2/2] A temporary fix for undefined attribute bulk_read. See: https://github.com/aparo/pyes/commit/e53999a77f5e4cf68845778a3b15443e6ea2958d#commitcomment-982559 --- pyes/query.py | 1 + 1 file changed, 1 insertion(+) 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): """