if there's nothing to delete dont delete
Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
parent
bcc5793486
commit
07f1c4297d
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue