def mapping_delete(index, doc_type, hosts=None, profile=None):
 es = _get_instance(hosts, profile)
 try:
  result = es.indices.delete_mapping(index=index, doc_type=doc_type)
  if result.get('acknowledged', False):
   return True
 except elasticsearch.exceptions.NotFoundError:
  return None
 return None

def mapping_delete ( index , doc_type , hosts = None , profile = None ) : es = _get_instance ( hosts , profile ) try : result = es . indices . delete_mapping ( index = index , doc_type = doc_type ) if result . get ( 'acknowledged' , False ) : return True except elasticsearch . exceptions . NotFoundError : return None return None
delete a mapping along with its data cli example:: salt myminion elasticsearch .