From d55ce368fcbb6bfea87756ed6d1c5f003f2e054f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Honza=20Kr=C3=A1l?= Date: Fri, 17 Jan 2014 22:44:15 +0100 Subject: [PATCH] indices.get_field_mapping --- elasticsearch/client/indices.py | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/elasticsearch/client/indices.py b/elasticsearch/client/indices.py index 5eb7ec01..9cea70cb 100644 --- a/elasticsearch/client/indices.py +++ b/elasticsearch/client/indices.py @@ -230,8 +230,9 @@ class IndicesClient(NamespacedClient): params=params) return data - @query_params("include_defaults") - def get_field_mapping(self, index=None, doc_type=None, field=None, params=None): + @query_params("include_defaults", 'ignore_unavailable', 'allow_no_indices', + 'expand_wildcards', 'local') + def get_field_mapping(self, field, index=None, doc_type=None, params=None): """ Retrieve mapping definition of a specific field. ``_ @@ -241,8 +242,17 @@ class IndicesClient(NamespacedClient): :arg doc_type: A comma-separated list of document types :arg field: A comma-separated list of fields to retrieve the mapping for :arg include_defaults: A boolean indicating whether to return default values + :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', 'field', field), + _, data = self.transport.perform_request('GET', _make_path(index, '_mapping', doc_type, 'field', field), params=params) return data