mirror of
https://github.com/deepset-ai/haystack.git
synced 2025-11-08 13:54:31 +00:00
Fix refresh behaviour for Elasticsearch delete (#794)
This commit is contained in:
parent
d62355ca88
commit
5bf351ea7b
@ -780,6 +780,7 @@ class ElasticsearchDocumentStore(BaseDocumentStore):
|
|||||||
query["query"] = {"match_all": {}}
|
query["query"] = {"match_all": {}}
|
||||||
self.client.delete_by_query(index=index, body=query, ignore=[404])
|
self.client.delete_by_query(index=index, body=query, ignore=[404])
|
||||||
# We want to be sure that all docs are deleted before continuing (delete_by_query doesn't support wait_for)
|
# We want to be sure that all docs are deleted before continuing (delete_by_query doesn't support wait_for)
|
||||||
|
if self.refresh_type == "wait_for":
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user