def index_create(index, body=None, hosts=None, profile=None):
 es = _get_instance(hosts, profile)
 try:
  if index_exists(index):
   return True
  else:
   result = es.indices.create(index=index, body=body)
   return True
 except elasticsearch.exceptions.NotFoundError:
  return None
 return None

def index_create ( index , body = None , hosts = None , profile = None ) : es = _get_instance ( hosts , profile ) try : if index_exists ( index ) : return True else : result = es . indices . create ( index = index , body = body ) return True except elasticsearch . exceptions . NotFoundError : return None return None
create an index cli example:: salt myminion elasticsearch .