Skip to content

Commit

Permalink
es model flush fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
milashensky committed Aug 1, 2018
1 parent c83ed66 commit e7a4e6a
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions django_elasticsearch/managers.py
Original file line number Diff line number Diff line change
Expand Up @@ -357,8 +357,6 @@ def reindex_all(self, queryset=None):
instance.es.do_index()

def flush(self):
es_client.indices.delete_mapping(index=self.index,
doc_type=self.doc_type,
ignore=404)
self.create_index()
es_client.indices.flush(index=self.index,
ignore_unavailable=True)
self.reindex_all()

0 comments on commit e7a4e6a

Please sign in to comment.