def mapping_get(index, doc_type, hosts=None, profile=None):
 es = _get_instance(hosts, profile)
 try:
  ret = es.indices.get_mapping(index=index, doc_type=doc_type)
  return ret
 except elasticsearch.exceptions.NotFoundError:
  return None
 return None

def mapping_get ( index , doc_type , hosts = None , profile = None ) : es = _get_instance ( hosts , profile ) try : ret = es . indices . get_mapping ( index = index , doc_type = doc_type ) return ret except elasticsearch . exceptions . NotFoundError : return None return None
retrieve mapping definition of index or index/type cli example:: salt myminion elasticsearch .