diff --git a/appbuilder/core/components/retriever/bes/bes_retriever.py b/appbuilder/core/components/retriever/bes/bes_retriever.py index 06b830369..e4f2a3d1c 100644 --- a/appbuilder/core/components/retriever/bes/bes_retriever.py +++ b/appbuilder/core/components/retriever/bes/bes_retriever.py @@ -66,8 +66,13 @@ def _lazy_import_es(self): self._es = Elasticsearch self._helpers = helpers except ImportError: - raise ImportError("Elasticsearch module is not installed. " - "Please install it using 'pip install elasticsearch==7.11.0'.") + try: + from elasticsearch7 import Elasticsearch, helpers + self._es = Elasticsearch + self._helpers = helpers + except ImportError: + raise ImportError("Elasticsearch module is not installed. " + "Please install it using 'pip install elasticsearch==7.11.0'.") @staticmethod def generate_id(length=16):