mirror of
https://github.com/langgenius/dify.git
synced 2026-04-26 02:06:35 +08:00
fix: elasticsearch_vector version (#28028)
Co-authored-by: huangzhuo <huangzhuo1@xiaomi.com> 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>
This commit is contained in:
parent
ab39f39db0
commit
6325ed9cd3
@ -147,7 +147,8 @@ class ElasticSearchVector(BaseVector):
|
|||||||
|
|
||||||
def _get_version(self) -> str:
|
def _get_version(self) -> str:
|
||||||
info = self._client.info()
|
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):
|
def _check_version(self):
|
||||||
if parse_version(self._version) < parse_version("8.0.0"):
|
if parse_version(self._version) < parse_version("8.0.0"):
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user