Skip to content

Search Interface

The search interface provides a powerful way to explore your codebase using Zoekt query syntax.

Enter your query in the search bar and press Enter or click Search.

function handleRequest

Results appear instantly with matching code highlighted.

Code Search uses Zoekt query syntax for powerful searching. Here are the most common patterns:

Pattern Description
foo bar Both “foo” and “bar” (implicit AND)
foo or bar Either “foo” or “bar”
"exit boot" Exact phrase match
FOO case:yes Case-sensitive search
/open(File|Dir)/ Regular expression
Modifier Example Description
file: file:README setup Filter by filename
repo: repo:torvalds/linux test Filter by repository
lang: lang:typescript Filter by language
branch: branch:main Filter by branch
case:yes FOO case:yes Case-sensitive search
case:no foo case:no Case-insensitive (default)
-lang: foo -lang:c Negate filter
-file: foo -file:test Exclude files
-repo: foo -repo:deprecated Exclude repository
Pattern Description
file:\.py$ Files ending in “.py”
sym:main Symbol definitions
content:README Search content only (not filenames)
repo:myorg/api lang:go func.*Handler -file:test

This searches for:

  • Pattern matching func.*Handler (regex)
  • In Go files
  • In the myorg/api repo
  • Excluding files with “test” in the path

Each result shows:

  • Repository name - The source repository
  • File path - Path to the matching file
  • Matching lines - Code with syntax highlighting
  • Line numbers - For easy reference

Click on any result to expand and see more context around the match.

Use /pattern/ syntax for regex matching:

/func\s+\w+Handler\(/

Matches function declarations ending in Handler.

Search for symbol definitions:

sym:CreateUser

Finds definitions (functions, classes, types) named CreateUser.

lang:go sym:auth

Find Go symbol definitions related to authentication.

Shortcut Action
/ Focus search bar
Escape Clear search / close preview
↑ / ↓ Navigate results
Enter Open result

The search query is encoded in the URL - share it with teammates:

http://localhost:3000?q=repo:api+lang:go+handler