Fix elasticsearch scores if they are 0.0 (#1980)

* fix elasticsearch zero scores

* remove unnecessary None check
This commit is contained in:
tstadel 2022-01-11 09:35:02 +01:00 committed by GitHub
parent a44b6c18c0
commit 192e03be33
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -957,7 +957,7 @@ class ElasticsearchDocumentStore(BaseDocumentStore):
if name:
meta_data["name"] = name
score = hit["_score"] if hit["_score"] else None
score = hit["_score"]
if score:
if adapt_score_for_embedding:
score = self._scale_embedding_score(score)