diff --git a/elasticsearch/client/indices.py b/elasticsearch/client/indices.py index 2bf20236..d0619e77 100644 --- a/elasticsearch/client/indices.py +++ b/elasticsearch/client/indices.py @@ -200,6 +200,22 @@ 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): + """ + Retrieve mapping definition of a specific field. + ``_ + + :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 field: A comma-separated list of fields to retrieve the mapping for + :arg include_defaults: A boolean indicating whether to return default values + """ + _, data = self.transport.perform_request('GET', _make_path(index, doc_type, '_mapping', 'field', field), + params=params) + return data + @query_params('master_timeout') def delete_mapping(self, index, doc_type, params=None): """ diff --git a/test_elasticsearch/rest-api-spec b/test_elasticsearch/rest-api-spec index 86ca3f73..11624fb0 160000 --- a/test_elasticsearch/rest-api-spec +++ b/test_elasticsearch/rest-api-spec @@ -1 +1 @@ -Subproject commit 86ca3f737ea0aa25264a2d94c2c4df8562deb1fd +Subproject commit 11624fb007a886ebcb8eb18c8d49be4d7be32821