if there's nothing to delete dont delete

Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
Jakub Sokołowski 2019-06-13 00:14:32 -04:00
parent bcc5793486
commit 07f1c4297d
No known key found for this signature in database
GPG Key ID: 4EF064D0E6D63020
1 changed files with 1 additions and 1 deletions

View File

@ -73,7 +73,7 @@ def main():
if opts.query > 0:
resp = es.search(index=index, body=body)
print_logs(resp['hits']['hits'])
elif opts.delete:
elif opts.delete and count > 0:
rval = es.delete_by_query(index=index, body=body)
rval2 = es.indices.forcemerge(
index=index,