Skip to content

Add search query quick reference and fix broken query examples - #2118

Open
marcleblanc2 wants to merge 5 commits into
mainfrom
marc/search-query-quick-reference
Open

marcleblanc2 wants to merge 5 commits into
mainfrom
marc/search-query-quick-reference

Conversation

@marcleblanc2

@marcleblanc2 marcleblanc2 commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor
  • Adds a quick reference section to the search query syntax page, based on the Code Search cheat sheet

  • Fixes examples that were invalid or broken

    • Every example on that page now searches public repositories on sourcegraph.com (mostly kubernetes/kubernetes and microsoft/vscode), and each linked query was verified
  • Fixed outdated information about Code Ownership

@vercel

vercel Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
sourcegraph-docs Ready Ready Preview Oct 31, 2026 12:20am UTC

Request Review

@github-actions

github-actions Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Direct preview links to pages changed in this PR:

@github-actions

Copy link
Copy Markdown
Contributor

@github-actions

This comment has been minimized.

@github-actions

github-actions Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

✅ This revision adds no duplicated passages, and edits none

marcleblanc2 and others added 3 commits October 31, 2026 00:00
Add a Quick reference section to the search query syntax page, adapted
from the Code Search cheat sheet and verified on sourcegraph.sourcegraph.com:
scope/narrow/version/find, common patterns and filters, and branch and tag
searches, which need a repo: filter.

Fix examples that failed verification: the file:has.owner filter name, the
(open|close)file typo, the has.topic and has.contributor link targets,
rev:at.time and before:/after: examples that were invalid on their own, the
vscode default branch, the revision glob links to a repository that no
longer exists, and the Search Jobs all-branches query.

Amp-Thread-ID: https://ampcode.com/threads/T-1f043295-17f3-4f30-b014-ca3aff6606c2
Co-authored-by: Amp <amp@ampcode.com>
Replace examples that searched private repositories, placeholders, or
repositories that are no longer on Sourcegraph.com with queries against
kubernetes/kubernetes and microsoft/vscode, so every linked example runs
on Sourcegraph.com and shows the query it links to.

Amp-Thread-ID: https://ampcode.com/threads/T-1f043295-17f3-4f30-b014-ca3aff6606c2
Co-authored-by: Amp <amp@ampcode.com>
Regenerate the Search Jobs results sample from a real search job on
kubernetes/kubernetes, replacing output from a private repository, and
show file:has.owner with microsoft/vscode, which has a CODEOWNERS file.
Ownership search reads owners only from CODEOWNERS files.

Amp-Thread-ID: https://ampcode.com/threads/T-1f043295-17f3-4f30-b014-ca3aff6606c2
Co-authored-by: Amp <amp@ampcode.com>
@marcleblanc2
marcleblanc2 force-pushed the marc/search-query-quick-reference branch from 6649b75 to b543e28 Compare October 31, 2026 00:02
Remove the leftover reference to a second way of configuring ownership,
state that ownership comes only from committed CODEOWNERS files and which
file wins when several exist, and replace examples that searched a
private repository with grafana/grafana examples that run on
Sourcegraph.com. Fix the list of predicates without parameters.

Amp-Thread-ID: https://ampcode.com/threads/T-1f043295-17f3-4f30-b014-ca3aff6606c2
Co-authored-by: Amp <amp@ampcode.com>
Long queries in narrow table columns wrapped onto several lines and squeezed
the descriptions. Each example now gets a description line and a full-width
query.

Amp-Thread-ID: https://ampcode.com/threads/T-1f043295-17f3-4f30-b014-ca3aff6606c2
Co-authored-by: Amp <amp@ampcode.com>

This branch was successfully deployed

1 active deployment
Preview — 52a795cb Deployed Oct 31, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant