Don't delete search stories without doc type on ES 1.7.

This commit is contained in:
Samuel Clay 2021-04-29 10:08:01 -04:00
parent 08bd3497b8
commit 5325ea57d1

View file

@ -301,8 +301,8 @@ class SearchStory:
def remove(cls, story_hash): def remove(cls, story_hash):
try: try:
cls.ES().delete(index=cls.index_name(), id=story_hash, doc_type=cls.doc_type()) cls.ES().delete(index=cls.index_name(), id=story_hash, doc_type=cls.doc_type())
except elasticsearch.exceptions.NotFoundError as e: # except elasticsearch.exceptions.NotFoundError as e:
cls.ES().delete(index=cls.index_name(), id=story_hash) # cls.ES().delete(index=cls.index_name(), id=story_hash)
except elasticsearch.exceptions.NotFoundError as e: except elasticsearch.exceptions.NotFoundError as e:
logging.debug(f" ***> ~FRNo search server available for story deletion: {e}") logging.debug(f" ***> ~FRNo search server available for story deletion: {e}")