From 5fcb42422562a9e440d14ae6e4d9ea9942bd2026 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Honza=20Kr=C3=A1l?= Date: Fri, 17 Jan 2014 22:46:19 +0100 Subject: [PATCH] get_mapping --- elasticsearch/client/indices.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/elasticsearch/client/indices.py b/elasticsearch/client/indices.py index 9cea70cb..83bdbeee 100644 --- a/elasticsearch/client/indices.py +++ b/elasticsearch/client/indices.py @@ -216,7 +216,8 @@ class IndicesClient(NamespacedClient): params=params, body=body) return data - @query_params() + @query_params('ignore_unavailable', 'allow_no_indices', + 'expand_wildcards', 'local') def get_mapping(self, index=None, doc_type=None, params=None): """ Retrieve mapping definition of index or index/type. @@ -225,8 +226,17 @@ class IndicesClient(NamespacedClient): :arg index: A comma-separated list of index names; use `_all` or empty string for all indices :arg doc_type: A comma-separated list of document types + :arg allow_no_indices: Whether to ignore if a wildcard indices + expression resolves into no concrete indices. (This includes `_all` string or + when no indices have been specified) + :arg expand_wildcards: Whether to expand wildcard expression to concrete indices + that are open, closed or both. + :arg ignore_unavailable: Whether specified concrete indices should be ignored + when unavailable (missing or closed) + :arg local: Return local information, do not retrieve the state from + master node (default: false) """ - _, data = self.transport.perform_request('GET', _make_path(index, doc_type, '_mapping'), + _, data = self.transport.perform_request('GET', _make_path(index, '_mapping', doc_type), params=params) return data