diff --git a/internal/elastic/core/elastic.go b/internal/elastic/core/elastic.go index 44365798c..32abfc3a6 100644 --- a/internal/elastic/core/elastic.go +++ b/internal/elastic/core/elastic.go @@ -236,6 +236,7 @@ func (e *Elastic) deleteByQuery(indices []string, query map[string]interface{}) options := []func(*esapi.DeleteByQueryRequest){ e.DeleteByQuery.WithContext(context.Background()), e.DeleteByQuery.WithConflicts("proceed"), + e.DeleteByQuery.WithWaitForCompletion(true), } resp, err := e.DeleteByQuery( indices,