Skip to content
Snippets Groups Projects
Commit 99a846df authored by Alessandro Cerioni's avatar Alessandro Cerioni
Browse files

Refresh and proceed on conflicts upon delete_by_query

parent 90f72c13
No related branches found
No related tags found
No related merge requests found
......@@ -136,10 +136,10 @@ def on_msg_callback(channel, method, properties, body):
the_query['query']['term'] = {'uuid.keyword': '{0}'.format(uuid)}
try:
res = es.delete_by_query(index, doc_type='_doc', body=the_query)
logging.debug(res)
res = es.indices.refresh(index=index)
res = es.delete_by_query(index, doc_type='_doc', body=the_query, conflicts='proceed', refresh=True)
logging.debug(res)
#res = es.indices.refresh(index=index)
#logging.debug(res)
except NotFoundError:
pass
except Exception as e:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment