scoreidcache-fix
All checks were successful
Deploy on push / deploy (push) Successful in 1m7s

This commit is contained in:
2024-06-02 15:32:02 +03:00
parent a3d1d1b067
commit 67e4cacb28
2 changed files with 11 additions and 4 deletions

View File

@@ -177,8 +177,8 @@ class SearchService:
if self.client:
search_response = self.client.search(index=self.index_name, body=search_body, size=limit, from_=offset)
hits = search_response["hits"]["hits"]
results = [{**hit["_source"], "score": hit["_score"]} for hit in hits]
results = [{"id": hit["_id"], "score": hit["_score"]} for hit in hits]
# results = [{**hit["_source"], "score": hit["_score"]} for hit in hits]
# если результаты не пустые
if results: