def get_mapping(self, doc_type=None, indices=None, raw=False):
if doc_type is None and indices is None:<EOL><INDENT>path = make_path("<STR_LIT>")<EOL>is_mapping = False<EOL><DEDENT>else:<EOL><INDENT>indices = self.conn._validate_indices(indices)<EOL>if doc_type:<EOL><INDENT>path = make_path('<STR_LIT:U+002C>'.join(indices), doc_type, "<STR_LIT>")<EOL>is_mapping = True<EOL><DEDENT>else:<EOL><INDENT>path = make_path('<STR_LIT:U+002C>'.join(indices), "<STR_LIT>")<EOL>is_mapping = False<EOL><DEDENT><DEDENT>result = self.conn._send_request('<STR_LIT:GET>', path)<EOL>if raw:<EOL><INDENT>return result<EOL><DEDENT>from pyes.mappings import Mapper<EOL>mapper = Mapper(result, is_mapping=False,<EOL>connection=self.conn,<EOL>document_object_field=self.conn.document_object_field)<EOL>if doc_type:<EOL><INDENT>return mapper.mappings[doc_type]<EOL><DEDENT>return mapper<EOL>
Register specific mapping definition for a specific type against one or more indices.
(See :ref:`es-guide-reference-api-admin-indices-get-mapping`)