Fast trigram based code search
6 days ago
- #source-code
- #zoekt
- #search-engine
- Zoekt is a text search engine for source code, supporting fast substring and regexp matching.
- It features a rich query language with boolean operators (and, or, not) and can search individual or multiple repositories.
- Zoekt ranks search results using code-related signals like symbol matches.
- It can be used via command line for indexing and searching repositories or through an indexserver and webserver for larger-scale operations.
- The webserver provides a web UI and API for searching, including a JSON API with advanced features like streaming results and BM25 scoring.
- Installation is done via 'go get github.com/sourcegraph/zoekt/' and Universal ctags is recommended for better symbol information.
- The indexserver can be configured to periodically fetch and reindex repositories from a code host like GitHub.
- The webserver starts a search UI at http://localhost:6070 and exposes a gRPC API for structured queries and advanced search options.
- Zoekt was created by Han-Wen Nienhuys with contributions from Alexander Neubeck.