A Whole New Code Search
Finding great code on GitHub just got a whole lot easier. Today we’re releasing several big improvements to code search. New Technology First, we are unveiling our new search infrastructure…
Finding great code on GitHub just got a whole lot easier. Today we’re releasing several big improvements to code search.
New Technology
First, we are unveiling our new search infrastructure that will grow to support the immense amount of source code being pushed to GitHub each day.
Under the hood is an ElasticSearch cluster that live-indexes your code as you push it up to GitHub. Search results will be returned from public and private repositories that you have access to.
To ensure better relevancy, we’re being conservative in what we add to the search index. Repository forks will not be searchable unless the fork has more stars than the parent repository, for example.
New Design
The code search landing page has been redesigned as well. When you’re logged in, the search field has the command bar built in.
Advanced Search
The new advanced code search page helps you discover what you can search. You can filter by things like number of stars, number of forks, or file extension. As you fill in the advanced search fields below, it will show you the advanced query above.
Repository Results
Each repository result now includes repository activity. This’ll help you scan the results for more active repositories.
The most exciting part is repository results now include your private repos!
Code Results
The code search results have also been redesigned, including a bunch of new magic that we didn’t have before. Here are a few of the improvements:
- Line numbers in results
- Code syntax highlighting
- Last indexed time
- Search by file extensions
- Search by path
- Limit by owner or project
Developer Results
We cleaned up the user results page leaving just what you need: accurate results, and the ability to follow users directly from those results.
Happy searching!
Written by
Related posts
Celebrating the GitHub Awards 2024 recipients 🎉
The GitHub Awards celebrates the outstanding contributions and achievements in the developer community by honoring individuals, projects, and organizations for creating an outsized positive impact on the community.
New from Universe 2024: Get the latest previews and releases
Find out how we’re evolving GitHub and GitHub Copilot—and get access to the latest previews and GA releases.
Bringing developer choice to Copilot with Anthropic’s Claude 3.5 Sonnet, Google’s Gemini 1.5 Pro, and OpenAI’s o1-preview
At GitHub Universe, we announced Anthropic’s Claude 3.5 Sonnet, Google’s Gemini 1.5 Pro, and OpenAI’s o1-preview and o1-mini are coming to GitHub Copilot—bringing a new level of choice to every developer.