Search backend: use sort interface of `result.Matches`
Created by: camdencheek
We have a built-in sorting mechanism for the result.Matches
type, and it was almost equivalent to that of sortResults
. This brings the two into agreement and removes sortResults
in favor of the sorting interface implemented by result.Matches
.
To do this, I needed to:
- Remove
exactFilePatterns
logic. This was already unused sinceexactFilePatterns
was always being passed asnil
. - Add
AuthorDate
to theKey
type and modified theLess()
method to use it for sorting. Previously, we were sorting byCommitID
, but this is not a very useful sort for commit results. - Convert a few uses of
[]result.Match
toresult.Matches
so we can use the sort interface it implements