fix:score threshold (#24897)
This commit is contained in:
parent
9486715929
commit
2042353526
24 changed files with 25 additions and 25 deletions
|
|
@ -211,7 +211,7 @@ class OpenSearchVector(BaseVector):
|
|||
|
||||
metadata["score"] = hit["_score"]
|
||||
score_threshold = float(kwargs.get("score_threshold") or 0.0)
|
||||
if hit["_score"] > score_threshold:
|
||||
if hit["_score"] >= score_threshold:
|
||||
doc = Document(page_content=hit["_source"].get(Field.CONTENT_KEY.value), metadata=metadata)
|
||||
docs.append(doc)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue