From 4c649682c766329b41257a5754b272e5e9c0cdf8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Honza=20Kr=C3=A1l?= Date: Thu, 11 Sep 2014 13:02:48 +0200 Subject: [PATCH] Add indices.get API --- elasticsearch/client/indices.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/elasticsearch/client/indices.py b/elasticsearch/client/indices.py index 08d416fe..89846ed8 100644 --- a/elasticsearch/client/indices.py +++ b/elasticsearch/client/indices.py @@ -96,6 +96,26 @@ class IndicesClient(NamespacedClient): params=params, body=body) return data + @query_params('allow_no_indices', 'expand_wildcards', 'ignore_unavailable', + 'local') + def get(self, index, feature=None, params=None): + """ + ``_ + + :arg index: A comma-separated list of index names + :arg feature: A comma-separated list of features + :arg allow_no_indices: Ignore if a wildcard expression resolves to no + concrete indices (default: false) + :arg expand_wildcards: Whether wildcard expressions should get expanded + to open or closed indices (default: open) + :arg ignore_unavailable: Ignore unavailable indexes (default: false) + :arg local: Return local information, do not retrieve the state from + master node (default: false) + """ + _, data = self.transport.perform_request('GET', _make_path(index, + feature), params=params) + return data + @query_params('timeout', 'master_timeout' 'allow_no_indices', 'expand_wildcards', 'ignore_unavailable') def open(self, index, params=None):