From 57a9b5b03de1902f047987abb98224e5c5942cd6 Mon Sep 17 00:00:00 2001 From: Alberto Paro Date: Wed, 15 Feb 2012 12:49:24 +0100 Subject: [PATCH] Added get_settings method to ES class. --- pyes/es.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/pyes/es.py b/pyes/es.py index db5553e8..e883b5ce 100644 --- a/pyes/es.py +++ b/pyes/es.py @@ -1365,6 +1365,14 @@ def delete_river(self, river, river_name=None): return self._send_request('DELETE', '/_river/%s/' % river_name) #--- settings management + + def get_settings(self, index=None): + """ + Returns the current settings for an index. + """ + path = self._make_path([index, "_settings"]) + return self._send_request('GET', path) + def update_settings(self, index, newvalues): """ Update Settings of an index. @@ -1668,7 +1676,7 @@ def next(self): def __iter__(self): self.iterpos = 0 if self._current_item != 0: - self._results = None + self._results = None self._current_item = 0 self.start = 0