fix(vector): use semantic version comparison for version check (#24409)
This commit is contained in:
parent
f31ddc4b1c
commit
23dcb2dc1b
2 changed files with 2 additions and 2 deletions
|
|
@ -101,7 +101,7 @@ class MilvusVector(BaseVector):
|
||||||
if "Zilliz Cloud" in milvus_version:
|
if "Zilliz Cloud" in milvus_version:
|
||||||
return True
|
return True
|
||||||
# For standard Milvus installations, check version number
|
# For standard Milvus installations, check version number
|
||||||
return version.parse(milvus_version).base_version >= version.parse("2.5.0").base_version
|
return version.parse(milvus_version) >= version.parse("2.5.0")
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.warning("Failed to check Milvus version: %s. Disabling hybrid search.", str(e))
|
logger.warning("Failed to check Milvus version: %s. Disabling hybrid search.", str(e))
|
||||||
return False
|
return False
|
||||||
|
|
|
||||||
|
|
@ -152,7 +152,7 @@ class OceanBaseVector(BaseVector):
|
||||||
ob_full_version = result.fetchone()[0]
|
ob_full_version = result.fetchone()[0]
|
||||||
ob_version = ob_full_version.split()[1]
|
ob_version = ob_full_version.split()[1]
|
||||||
logger.debug("Current OceanBase version is %s", ob_version)
|
logger.debug("Current OceanBase version is %s", ob_version)
|
||||||
return version.parse(ob_version).base_version >= version.parse("4.3.5.1").base_version
|
return version.parse(ob_version) >= version.parse("4.3.5.1")
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.warning("Failed to check OceanBase version: %s. Disabling hybrid search.", str(e))
|
logger.warning("Failed to check OceanBase version: %s. Disabling hybrid search.", str(e))
|
||||||
return False
|
return False
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue