Code Search
Full search query syntax.
Introduction
| Topic | Description | 
|---|---|
| Intro to Sourcegraph Search Types | Navigating the Code Search web app and the Keyword, Literal, Regex, and Structural search. | 
| Search Results Page Overview | Navigating the search results page. | 
| Intro to Search Filters | An overview of the most commonly-used search filters such as Language, Repo, and File. | 
| Search Types | Searching against Code, Repo, Path, Symbol, Commit, and Diff data. | 
| Code Navigation | Finding defintions and references, and an explanation of precise versus search-based code navigation. | 
| Saving Searches | Saving commonly-used searches. | 
| Search Contexts | Intro to Search Contexts and how to manage them. | 
Advanced Searches
| Topic | Description | 
|---|---|
| Non-default branches, revisions, and tags | Intro to Revision search and how to search for specific branches, revisions, and tags. | 
| Commit messages | Searching type:commitmessages. | 
| Diffs | Searching type:diff. | 
| Added or removed code | Combining type:diffwithselect:commit.diff.(added OR removed). | 
| By author | Using the author: filter. | 
| Time-boxing searches | Using the before:andafter:filters. | 
| Boolean operators | Using AND,OR, andNOToperators. | 
| Functions and other symbols | Using type:symbolfilter. | 
| Advanced symbol search | Combining the select:symbol.(symbol_type)andtype:symbolfilters. | 
| Selecting metadata | Using select:filter to return data other than the type of data searched against, e.g. returning all repos than contain a certain function. | 
| Advanced repo search | Using repo:has.(...)filters. | 
| Excluding stale repos | Using repo:has.commit.after(...)filter. | 
Batch Changes and Code Insights
| Topic | Description | 
|---|---|
| Batch Changes | Intro to managing Batch Changes and the batch spec file. | 
| Code Insights | Intro to Code Insights. | 
| Code Monitoring | Intro to Code Monitoring. |