def document_delete(index, doc_type, id, hosts=None, profile=None):
 es = _get_instance(hosts, profile)
 try:
  if (not index_exists(index=index)):
   return True
  else:
   result = es.delete(index=index, doc_type=doc_type, id=id)
   if result.get('found', False):
    return True
 except elasticsearch.exceptions.NotFoundError:
  return None
 return None

def document_delete ( index , doc_type , id , hosts = None , profile = None ) : es = _get_instance ( hosts , profile ) try : if ( not index_exists ( index = index ) ) : return True else : result = es . delete ( index = index , doc_type = doc_type , id = id ) if result . get ( 'found' , False ) : return True except elasticsearch . exceptions . NotFoundError : return None return None
document delete .