sourcegraph / zoekt

Fast trigram based code search
Apache License 2.0
736 stars 83 forks source link

fix: don't modify candidates #773

Closed stefanhengl closed 6 months ago

stefanhengl commented 6 months ago

While working on ranking, I noticed that sum-tf is wrong if we have filename and content matches.

image

We use finalCands in our BM25 scoring, however, finalCands is modified in fillChunkMatches and fillMatches which can lead to surprising scores.

Test plan: updated unit test