-
Notifications
You must be signed in to change notification settings - Fork 96
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
eval: do not sort matches in indexData.Search
We already do sorting in shards.go. By sorting in Search we no longer have matches from the same repo next to each other.
- Loading branch information
1 parent
1e39407
commit e6e6f42
Showing
1 changed file
with
4 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -346,7 +346,10 @@ nextFileMatch: | |
res.Stats.MatchCount += len(fileMatch.LineMatches) | ||
res.Stats.FileCount++ | ||
} | ||
SortFilesByScore(res.Files) | ||
|
||
// We do not sort Files here, instead we rely on the shards pkg to do file | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
keegancsmith
Author
Member
|
||
// ranking. If we sorted now, we would break the assumption that results | ||
// from the same repo in a shard appear next to each other. | ||
|
||
for _, md := range d.repoMetaData { | ||
r := md | ||
|
Is there a better place to put this comment? I feel like this is only here because this describes what used to be the previous behavior - not because it describes the current flow of the function