You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed that the code search uses the repo_id to sort the results. I propose we start sorting by relevance (i.e., by _score).
This will be needed by #32096 (I've noticed this while coding it), as GitHub's search considers matches in filenames more relevant than those in content. Moreover, Sorting by relevance seems more sensible than sorting by the repo_id.
If you guys are ok with it, I'll open a PR.
P.S. It was hard to decide if this was a bug or a feature. In the end, I went with the latter since the code search does work.
Feature Description
I noticed that the code search uses the
repo_id
to sort the results. I propose we start sorting by relevance (i.e., by_score
).This will be needed by #32096 (I've noticed this while coding it), as GitHub's search considers matches in filenames more relevant than those in content. Moreover, Sorting by relevance seems more sensible than sorting by the
repo_id
.If you guys are ok with it, I'll open a PR.
P.S. It was hard to decide if this was a bug or a feature. In the end, I went with the latter since the code search does work.
P.S. Both ElasticSearch and Bleve allow sorting by relevance.
Screenshots
No response
The text was updated successfully, but these errors were encountered: