Allow Filter by File Type in Code Search
Proposal
Right now code searches have relatively little available in terms of search refinements, which can make search incredibly annoying to use.
For example, if I search for "gsettings" in the GLib repository on the GNOME Gitlab, the search results are dominated by the "NEWS" file, with no easy way to filter it out.
By contrast, if I search for "gsettings" in the GLib mirror repository on GitHub, I get the ability to filter by file type, and the default setting of "Sort by Best Match" prioritizes actual code files rather than the "NEWS" file.
If we look at the GitHub search sidebar:
The upper portion of the sidebar has roughly the same functionality as Gitlab search does, but the lower portion offers the ability to filter the search results by file type. (My impression is that this filter is a little more clever than just using file extensions, but I'm not sure about that.)
There are a lot of enhancements to Gitlab search that would be nice, but being able to filter by file type seems like a reasonable place to start. (GitHub also has extensive advaced search options that I don't really have much experience with.)
There may very well be existing issues in this issue tracker, but oh my the issue-tracker search isn't that great, either. Searching for "search filter file type" returns an indefinite number of results (literally, the number isn't shown), and the lack of relevance makes it seem like the search is silently using OR
rather than AND
with the keywords, a sort of mindboggling search behavior I would more associate with Amazon.
Anyway, please fix search. Being able to filter code-search results by filetype is basic and important.