Skip to content

Commit

Permalink
@Natim review
Browse files Browse the repository at this point in the history
  • Loading branch information
leplatrem committed May 24, 2017
1 parent 0c02063 commit df919e4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions kinto_elasticsearch/indexer.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,10 @@ def delete_index(self, bucket_id, collection_id=None):
if collection_id is None:
collection_id = "*"
indexname = self.indexname(bucket_id, collection_id)
if self.client.indices.exists(index=indexname):
self.client.indices.delete(index=indexname)
try:
return self.client.indices.delete(index=indexname)
except elasticsearch.exceptions.NotFoundError: # pragma: no cover
pass

def search(self, bucket_id, collection_id, query, **kwargs):
indexname = self.indexname(bucket_id, collection_id)
Expand Down

0 comments on commit df919e4

Please sign in to comment.