diff --git a/haystack/document_store/elasticsearch.py b/haystack/document_store/elasticsearch.py index 6d00bb6b7..4efe4babf 100644 --- a/haystack/document_store/elasticsearch.py +++ b/haystack/document_store/elasticsearch.py @@ -904,6 +904,9 @@ class ElasticsearchDocumentStore(BaseDocumentStore): if index is None: index = self.index + if self.refresh_type == 'false': + self.client.indices.refresh(index=index) + if not self.embedding_field: raise RuntimeError("Specify the arg `embedding_field` when initializing ElasticsearchDocumentStore()")