From 1ea5b2337c9d172a862754baf1d2ab0a545d741c Mon Sep 17 00:00:00 2001 From: Logan <logan.markewich@live.com> Date: Fri, 9 Feb 2024 10:21:43 -0600 Subject: [PATCH] fix elasticsearch async check (#10549) --- llama_index/vector_stores/elasticsearch.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/llama_index/vector_stores/elasticsearch.py b/llama_index/vector_stores/elasticsearch.py index 44e6b25349..8228ca4306 100644 --- a/llama_index/vector_stores/elasticsearch.py +++ b/llama_index/vector_stores/elasticsearch.py @@ -1,4 +1,5 @@ """Elasticsearch vector store.""" + import asyncio import uuid from logging import getLogger @@ -243,7 +244,7 @@ class ElasticsearchStore(BasePydanticVectorStore): index_name: Name of the AsyncElasticsearch index to create. dims_length: Length of the embedding vectors. """ - if await self.client.indices.exists(index=index_name): + if self.client.indices.exists(index=index_name): logger.debug(f"Index {index_name} already exists. Skipping creation.") else: -- GitLab