fix: #20560 When elasticsearch is used as the vector database, the Retrieval Test fails to filter the data after setting the Score Threshold, and the score of the recalled results is empty (#20561)

This commit is contained in:
zhaobingshuang
2025-06-03 13:24:26 +08:00
committed by GitHub
parent a145c2a8fe
commit 3f7aa38d77

View File

@@ -142,7 +142,7 @@ class ElasticSearchVector(BaseVector):
if score > score_threshold: if score > score_threshold:
if doc.metadata is not None: if doc.metadata is not None:
doc.metadata["score"] = score doc.metadata["score"] = score
docs.append(doc) docs.append(doc)
return docs return docs