FEAT: Tencent Vector search supports backward compatibility with the previous score calculation approach. (#22820)

Co-authored-by: wlleiiwang <wlleiiwang@tencent.com>
This commit is contained in:
wlleiiwang 2025-07-23 15:38:31 +08:00 committed by GitHub
parent eaae79a581
commit b4e152f775
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -284,6 +284,7 @@ class TencentVector(BaseVector):
# Compatible with version 1.1.3 and below. # Compatible with version 1.1.3 and below.
meta = json.loads(meta) meta = json.loads(meta)
score = 1 - result.get("score", 0.0) score = 1 - result.get("score", 0.0)
else:
score = result.get("score", 0.0) score = result.get("score", 0.0)
if score > score_threshold: if score > score_threshold:
meta["score"] = score meta["score"] = score