Sourcegraph Search Not Finding Results

Share
Workaround available Web, Self-hosted Updated November 14, 2026Based on 2 user reportsHow we research

Quick answer

Sourcegraph search only checks the default branch and skips forks and archived repos unless told otherwise; the pattern is also literal by default.

Most likely fix: Widen the scope

How to fix it

Try these in order — the most common fix is first.

  1. 1. Widen the scope

    1. Add rev: to search another branch, tag or commit
    2. Add fork:yes and archived:yes
    3. Remove repo: and file: filters one at a time
    Did this fix it?
  2. 2. Check the pattern type

    1. Enable regex (patternType:regexp or the toggle) if you use .* or other regex
    2. Add timeout:60s for broad searches
    Did this fix it?
  3. 3. If a repo is missing entirely

    1. See the repository not cloning guide: it may not be synced yet
    Did this fix it?

Symptoms

A search you know should match returns nothing or misses a repo.

Why it happens

  • Only HEAD of the default branch is searched
  • Forks and archived repositories are excluded by default
  • Pattern treated literally, not as regex
  • Over-strict repo: or file: filters
  • Search timeout (default 10 seconds)

This guide also covers

  • sourcegraph search not working
  • sourcegraph search no results
  • sourcegraph not finding code

Still not working?

If Sourcegraph keeps failing, you're not alone. See every Sourcegraph problem users report or the alternatives people switch to.

Have an app idea? Our small team builds any software: web and mobile apps, games, desktop, AI tools. Price agreed together.

Talk to us
Fixed it? Share this guide

Other Sourcegraph errors

All 11 Sourcegraph errors and fixes →