Skip to content

Commit 28ccc55

Browse files
orientalperiltoastdriven
authored andcommitted
do not refresh the index after it has been deleted
1 parent bf1b482 commit 28ccc55

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

haystack/backends/elasticsearch_backend.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -222,9 +222,6 @@ def clear(self, models=[], commit=True):
222222
# a ``query`` root object. :/
223223
query = {'query_string': {'query': " OR ".join(models_to_delete)}}
224224
self.conn.delete_by_query(self.index_name, 'modelresult', query)
225-
226-
if commit:
227-
self.conn.refresh(index=self.index_name)
228225
except (requests.RequestException, pyelasticsearch.ElasticHttpError), e:
229226
if not self.silently_fail:
230227
raise

0 commit comments

Comments
 (0)