Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
NouamaneTazi committed Aug 12, 2023
1 parent fc17f4a commit 505d80d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion beir/retrieval/search/dense/exact_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def search(self,
query_id = query_ids[query_itr]
for sub_corpus_id, score in zip(cos_scores_top_k_idx[query_itr], cos_scores_top_k_values[query_itr]):
corpus_id = corpus_ids[corpus_start_idx+sub_corpus_id]
assert ignore_identical_ids is True and corpus_id != query_id, "Query id and corpus id should not be the same"
assert ignore_identical_ids is False or corpus_id != query_id, "Query id and corpus id should not be the same if ignore_identical_ids is set to True"
if len(result_heaps[query_id]) < top_k:
# Push item on the heap
heapq.heappush(result_heaps[query_id], (score, corpus_id))
Expand Down

0 comments on commit 505d80d

Please sign in to comment.