-
Notifications
You must be signed in to change notification settings - Fork 91
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
score: do scoring on candidateMatches (#723)
This is a refactor which removes our duplicated scoring logic for ChunkMatch vs LineMatch. Instead we score slices of []*candidateMatch. Other than being a good refactor, candidateMatch is a much more appropriate structure to stuff in extra information for scoring than our public APIs. So this enables the work we want to do around atom based scoring. The only behaviour change in this commit are two fixes: - DocumentSection caching would fail if empty since we relied on the empty cache to be non-nil. This lead to inflated ContentBytesLoaded. - Empty FileMatch would still read in DocumentSection, even though it wasn't needed. Test Plan: go test. Our coverage is decent, we have lots of ranking tests which did not change and we have hardcoded stats of work done which did not change (except for the above fixes).
- Loading branch information
1 parent
18b6999
commit b82a981
Showing
3 changed files
with
98 additions
and
68 deletions.
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
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
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