GitLab
Follow
Exact Code Search: Find code faster across repositories
GitLab's new Exact Code Search allows users to find any line of code across 48 TB of repositories in milliseconds, delivering pinpoint precision and powerful regex support. Traditional code search tools often return false positives, lack context, and slow down as codebases grow. GitLab's Exact Code Search is powered by Zoekt, an open-source code search engine originally created by Google and now maintained by Sourcegraph. The feature has three key capabilities: Exact Match mode, Regular Expression mode, and Multiple-line matches. Exact Match mode returns only exact matches, eliminating false positives, while Regular Expression mode allows for sophisticated pattern matching. Multiple-line matches provide surrounding context, eliminating the need to click through files for basic comprehension. The feature has various real-world use cases, including debugging, code exploration, refactoring, security auditing, and cross-repository insights. Zoekt's speed comes from its use of positional trigrams, which maintain exact character sequences and their positions, ensuring only exact matches are returned. The Exact Code Search infrastructure is built to handle massive scale with impressive performance, indexing and searching over 48 TB of code data while maintaining lightning-fast response times. The system is designed for enterprise scale, with a self-registering node architecture, distributed system with intelligent load balancing, and seamless security integration.