From 2ffadcb9bcd8d26f9a2728d5125669cc5bdab27e Mon Sep 17 00:00:00 2001 From: nut Date: Mon, 31 Jul 2023 17:53:08 +0800 Subject: [PATCH] Update es.py --- apps/common/plugins/es.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/apps/common/plugins/es.py b/apps/common/plugins/es.py index 8438c43cc..95f878263 100644 --- a/apps/common/plugins/es.py +++ b/apps/common/plugins/es.py @@ -131,10 +131,7 @@ class ES(object): } try: - if version == '6': - self.es.indices.create(self.index, body=mappings) - else: - self.es.indices.create(index=self.index, body=mappings) + self.es.indices.create(index=self.index, body=mappings) except RequestError as e: if e.error == 'resource_already_exists_exception': logger.warning(e)