Skip to content

Commit

Permalink
fix: larger timeout on logo search
Browse files Browse the repository at this point in the history
  • Loading branch information
alexgarel committed Feb 26, 2025
1 parent 6e73b22 commit c456807
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion robotoff/logos.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,12 @@ def knn_search(
knn_body["filter"] = {"term": {"server_type": server_type.name}}

results = client.search(
index=ElasticSearchIndex.logo, knn=knn_body, source=False, size=k + 1
index=ElasticSearchIndex.logo,
knn=knn_body,
source=False,
size=k + 1,
# this can be a long request
timeout=20,
)
if hits := results["hits"]["hits"]:
return [(int(hit["_id"]), 1.0 - hit["_score"]) for hit in hits]
Expand Down

0 comments on commit c456807

Please sign in to comment.