From 1464c97a3093b391276a3bfff426b2f06cf24006 Mon Sep 17 00:00:00 2001 From: huangzhuo1949 <167434202+huangzhuo1949@users.noreply.github.com> Date: Mon, 10 Nov 2025 12:17:13 +0800 Subject: [PATCH] fix: elasticsearch_vector version (#28028) Co-authored-by: huangzhuo Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: crazywoola <100913391+crazywoola@users.noreply.github.com> Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> --- .../rag/datasource/vdb/elasticsearch/elasticsearch_vector.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/api/core/rag/datasource/vdb/elasticsearch/elasticsearch_vector.py b/api/core/rag/datasource/vdb/elasticsearch/elasticsearch_vector.py index 0ff8c915e6..1470713b88 100644 --- a/api/core/rag/datasource/vdb/elasticsearch/elasticsearch_vector.py +++ b/api/core/rag/datasource/vdb/elasticsearch/elasticsearch_vector.py @@ -147,7 +147,8 @@ class ElasticSearchVector(BaseVector): def _get_version(self) -> str: info = self._client.info() - return cast(str, info["version"]["number"]) + # remove any suffix like "-SNAPSHOT" from the version string + return cast(str, info["version"]["number"]).split("-")[0] def _check_version(self): if parse_version(self._version) < parse_version("8.0.0"):