GitHub has released its reworked code search engine, Blackbird, which is built on Rust and promises faster and more comprehensive software repository exploration.
This revision, which has been in development for three years, is part of GitHub’s efforts to enhance text-based search techniques for code queries.
With Blackbird, developers can quickly search, navigate, and comprehend their code, contextualize critical information and ultimately increase productivity. Colin Merkel, a software engineer at GitHub, stated that the new code search and view are designed to enable developers to be more efficient.
Initially, GitHub used Apache Solr for code search before building a new search service using Elasticsearch in 2013.
Blackbird was developed in 2020, two years after Microsoft acquired the company, to enhance GitHub’s existing Elasticsearch cluster without expanding its resource demands. Blackbird was built from scratch in Rust because an off-the-shelf tool with the necessary capabilities did not exist.
Blackbird can manage up to 640 queries per second, compared to 0.01 queries per second for ripgrep, and can index at a rate of about 120,000 documents per second.
Blackbird’s precomputed search indices that map numeric keys to values and other architectural enhancements, make it incredibly fast and far more capable than its predecessor. Additionally, it supports substring queries, regular expressions, and symbol search and contextualises code, prioritising the most important results.
Apart from the technicalities of indexing and querying 45 million repositories, GitHub’s new code search engine has a redesigned search interface that offers suggestions and competitions and a code view that combines search, browsing, and code navigation.
The revamped code search engine enables precise filtering, making it easy to locate specific text across repositories, such as values associated with the “memory” key in YAML configuration files for a Kubernetes cluster. It is also useful when identifying the particular part of an application that produced a specific error message.
GitHub’s primary goal with the new code search and code view is to help developers find essential information scattered across their codebase, contextualise that information, and increase productivity.
(Photo by Heye Jensen on Unsplash)
Learn more about Digital Transformation Week taking place in Amsterdam, California, and London.
Explore other upcoming enterprise technology events and webinars powered by TechForge here.