Skip to content
Snippets Groups Projects
Unverified Commit 1ea5b233 authored by Logan's avatar Logan Committed by GitHub
Browse files

fix elasticsearch async check (#10549)

parent a80a8363
No related branches found
No related tags found
No related merge requests found
"""Elasticsearch vector store.""" """Elasticsearch vector store."""
import asyncio import asyncio
import uuid import uuid
from logging import getLogger from logging import getLogger
...@@ -243,7 +244,7 @@ class ElasticsearchStore(BasePydanticVectorStore): ...@@ -243,7 +244,7 @@ class ElasticsearchStore(BasePydanticVectorStore):
index_name: Name of the AsyncElasticsearch index to create. index_name: Name of the AsyncElasticsearch index to create.
dims_length: Length of the embedding vectors. 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.") logger.debug(f"Index {index_name} already exists. Skipping creation.")
else: else:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment