Skip to content

Commit

Permalink
PR comment
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanhengl committed Jun 10, 2024
1 parent 43cd752 commit f283039
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions eval.go
Original file line number Diff line number Diff line change
Expand Up @@ -351,11 +351,13 @@ nextFileMatch:
repoMatchCount += len(fileMatch.LineMatches)
repoMatchCount += matchedChunkRanges

// Invariant: tfs[i] belongs to res.Files[i]
tfs = append(tfs, termFrequency{
doc: nextDoc,
tf: tf,
})
if opts.UseBM25Scoring {
// Invariant: tfs[i] belongs to res.Files[i]
tfs = append(tfs, termFrequency{
doc: nextDoc,
tf: tf,
})
}
res.Files = append(res.Files, fileMatch)

res.Stats.MatchCount += len(fileMatch.LineMatches)
Expand Down

0 comments on commit f283039

Please sign in to comment.