Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions docs/code-navigation/auto-indexing-configuration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -33,33 +33,33 @@ The pre-indexing steps, indexer container, local steps, and indexer arguments ar

Each indexing job object can be configured with the following keys.

#### [`steps`](#index-job-steps)
#### [`steps`](#steps)

The steps field defines an ordered sequence of pre-indexing actions (formatted as a [Docker step object](#docker-step-object)). Each step is executed before the indexer itself is invoked.

#### [`indexer`](#index-job-indexer)
#### [`indexer`](#indexer)

The name of the Docker image distribution of the target indexer.

#### [`local_steps`](#index-job-local-steps)
#### [`local_steps`](#local_steps)

An ordered sequence of commands to execute within a container running the configured indexer image. These commands are passed directly into the target container via `docker exec`, one at a time. Local steps should be used over Docker steps when the intended side effects alter state outside of the workspace on disk (e.g., setting up environment variables or installing OS packages require by the indexer tool).

#### [`indexer_args`](#index-job-indexer-args)
#### [`indexer_args`](#indexer_args)

An ordered sequence of arguments that make up the indexing command. The indexing command is passed directly into the target container via `docker exec`. This step is expected to produce a code graph index artifact (as described by the `root` and `outfile` fields, described below).

#### [`root`](#index-job-root)
#### [`root`](#root)

The working directory within the Docker container where the provided local steps and indexer commands are executed. This working directory is relative to the root of the target repository. An empty value (the default) indicates the root of the repository. This is also the directory relative to the path where the code graph index artifact is produced.

#### [`outfile`](#index-job-outfile)
#### [`outfile`](#outfile)

The path to the code graph index artifact produced by the indexer, which is uploaded to the target Sourcegraph instance via [`src` CLI](/cli/) after the index step has completed successfully. This path is relative to the index job `root` (defined above). If not supplied, the value is assumed to be `dump.lsif` (which is the default artifact name of many indexers).

Supply this argument when the target indexer produces a differently named artifact. Alternatively, some indexers provide flags to change the artifact name; in which case `dump.lsif` can be supplied there and a value for this key can be omitted.

#### [`requested_envvars`](#index-job-requested-envvars)
#### [`requested_envvars`](#requested_envvars)

List of environment variables needed. These are made accessible to steps, local_steps, and the indexer_args command.

Expand Down Expand Up @@ -102,15 +102,15 @@ Each configured Docker step is executed sequentially using the same volume-mount

Each Docker step object can be configured with the following keys.

#### [`image`](#docker-step-image)
#### [`image`](#image)

The name of the Docker image in which the configured commands are executed.

#### [`commands`](#docker-step-commands)
#### [`commands`](#commands)

An ordered sequence of commands to execute within a container running the configured image. These commands are passed directly into the target container via `docker exec`, one at a time.

#### [`root`](#docker-step-root)
#### [`root`](#root-1)

The working directory within the Docker container where the provided commands are executed. This working directory is relative to the root of the target repository. An empty value (the default) indicates the root of the repository.

Expand Down
2 changes: 1 addition & 1 deletion docs/code-navigation/auto-indexing.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ This step will control the scheduling of indexing jobs which are made available

### Tune the index scheduler

The frequency of index job scheduling can be tuned via the following environment variables read by `worker` service containers running the [`codeintel-auto-indexing`](/self-hosted/workers#codeintel-auto-indexing) task.
The frequency of index job scheduling can be tuned via the following environment variables read by `worker` service containers running the [`codeintel-auto-indexing`](/self-hosted/workers#codeintel-autoindexing-scheduler) task.

- **`PRECISE_CODE_INTEL_AUTO_INDEXING_TASK_INTERVAL`**: The time to run periodic codeintel auto-indexing tasks. The default is every 2 minutes
- **`PRECISE_CODE_INTEL_AUTO_INDEXING_REPOSITORY_PROCESS_DELAY`**: The minimum time that the same repository can be considered for auto-index scheduling. The default is every 24 hours
Expand Down
6 changes: 3 additions & 3 deletions docs/code-navigation/envvars.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ The following are variables are read from the `worker` service to control code g

### `codeintel-commitgraph`

The following variables influence the behavior of the [`codeintel-commitgraph` worker task](/self-hosted/workers#codeintel-commitgraph).
The following variables influence the behavior of the [`codeintel-commitgraph` worker task](/self-hosted/workers#codeintel-commitgraph-updater).

| **Name** | **Default** | **Description** |
| ------------------------------------------------------ | ------------------------ | ----------------------------------------------------------------------------------------------------------------------------- |
Expand All @@ -40,7 +40,7 @@ The following variables influence the behavior of the [`codeintel-commitgraph` w

### `codeintel-auto-indexing`

The following variables influence the behavior of the [`codeintel-auto-indexing` worker task](/self-hosted/workers#codeintel-auto-indexing).
The following variables influence the behavior of the [`codeintel-auto-indexing` worker task](/self-hosted/workers#codeintel-autoindexing-scheduler).

| **Name** | **Default** | **Description** |
| --------------------------------------------------------------- | ----------- | ------------------------------------------------------------------------------------------- |
Expand All @@ -59,7 +59,7 @@ The following settings should be the same for the [`frontend`](#frontend) servic

### `codeintel-janitor`

The following variables influence the behavior of the [`codeintel-janitor` worker task](/self-hosted/workers#codeintel-janitor).
The following variables influence the behavior of the [`codeintel-janitor` worker task](/self-hosted/workers#codeintel-upload-janitor).

| **Name** | **Default** | **Description** | |
| ------------------------------------------------------------------ | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | --- |
Expand Down
2 changes: 1 addition & 1 deletion docs/code-navigation/explanations/uploads.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Sourcegraph maintains a mapping from a commit of a repository to the set of uplo

Upon a state change in an upload, we flag the repository as needing an update. Subsequently, the worker service updates the commit graph and asynchronously clears the flag for that repository.

When an upload changes state, the repository is flagged as requiring an update status. Then the [`worker` service](/self-hosted/workers#codeintel-commitgraph)
When an upload changes state, the repository is flagged as requiring an update status. Then the [`worker` service](/self-hosted/workers#codeintel-commitgraph-updater)
will update the commit graph and unset the flag for that repository asynchronously.

While this flag is set, the repository's commit graph is considered `stale`. This means there may be some upload records in a `COMPLETED` state that aren't yet used to resolve code navigation queries.
Expand Down
2 changes: 1 addition & 1 deletion docs/code-navigation/inference-configuration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ This auto-indexing-specific library defines the following four path pattern cons

This library also defines the following two pattern collection constructors.

- `new_path_combine(patterns)` creates a pattern collection object (to be used with [recognizers](#sg-autoindex-recognizers)) from the given set of path `pattern`s.
- `new_path_combine(patterns)` creates a pattern collection object (to be used with [recognizers](#sgautoindexrecognizer)) from the given set of path `pattern`s.
- Type: `((pattern | array[pattern])...) -> pattern`
- `new_path_exclude(patterns)` creates a new _inverted_ pattern collection object. Paths matching these `pattern`s are filtered out from the set of matching filepaths given to a recognizer's `generate` function.
- Type: `((pattern | array[pattern])...) -> pattern`
Expand Down
4 changes: 2 additions & 2 deletions docs/code-navigation/precise-code-navigation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ Precise code navigation relies on the open source [SCIP Code Intelligence Protoc

1. **Manual indexing**. Index a repository and upload it to your Sourcegraph instance:

- [Index a Go repository](/code-navigation/how-to/index-a-go-repository#manual-indexing)
- [Index a TypeScript or JavaScript repository](/code-navigation/how-to/index-a-typescript-and-javascript-repository#manual-indexing)
- [Index a Go repository](/code-navigation/how-to/index-a-go-repository#indexing)
- [Index a TypeScript or JavaScript repository](/code-navigation/how-to/index-a-typescript-and-javascript-repository#one-off-indexing-using-scip-typescript-locally)
- [Index a Java, Scala, or Kotlin repository](https://sourcegraph.github.io/scip-java/docs/getting-started.html)
- [Index a Python repository](https://sourcegraph.com/github.com/sourcegraph/scip-python)
- [Index a Ruby repository](https://sourcegraph.com/github.com/sourcegraph/scip-ruby)
Expand Down
2 changes: 1 addition & 1 deletion docs/code-search/features.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ See the [query syntax](/code-search/queries#filters-diff-and-commit-searches-onl

Searching over commit messages is supported in Sourcegraph by adding `type:commit` to your search query. Separately, you can also use the `message:"any string"` parameter to filter `type:diff` searches for a given commit message. Commit message searches can narrowed down further with filters such as author and time.

See our [query syntax](/code-search/queries#diff-and-commit-searches-only) documentation for a comprehensive list of supported parameters.
See our [query syntax](/code-search/queries#filters-diff-and-commit-searches-only) documentation for a comprehensive list of supported parameters.

## Symbol search

Expand Down
10 changes: 5 additions & 5 deletions docs/code-search/how-to/opengrok.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@

Oracle OpenGrok provides wildcard support for searches. For example, to find all strings beginning with `foo`, you can use the wildcard search `foo*`. Similarly, OpenGrok provides the `?` operator for single character wildcards.

Sourcegraph, [provides full regular expression search](/code-search/queries#regexp-search), with support for the [RE2 syntax](https://golang.org/s/re2syntax). The same search above would take the form `foo.*` (or in this case, just `foo`, since Sourcegraph automatically supports partial matches). Much more powerful regexp expressions are available.
Sourcegraph, [provides full regular expression search](/code-search/queries#regular-expression-search), with support for the [RE2 syntax](https://golang.org/s/re2syntax). The same search above would take the form `foo.*` (or in this case, just `foo`, since Sourcegraph automatically supports partial matches). Much more powerful regexp expressions are available.

(Note that Sourcegraph also provides a [literal search mode](/code-search/queries#Literal-search-default) by default, in which there's no need to escape special characters. This simplifies searches such as `foo(`, which would result in an error in regexp mode.)
(Note that Sourcegraph also provides a [literal search mode](/code-search/queries#keyword-search-default) by default, in which there's no need to escape special characters. This simplifies searches such as `foo(`, which would result in an error in regexp mode.)

### Selecting repositories and branches

Expand All @@ -29,7 +29,7 @@ Sourcegraph provides a search filter (`repo:`) that supports regexp and partial
| - To search in a distinct list of repositories, you can use a ` |` character as a regexp OR operator: `pattern repo:github.com/org/repository1 | github.com/org/repository2`. |
| - Note this query could be simplified further using more advanced regexp matching if the two repos share part of their names, such as: `pattern repo:github.com/org/repository(1 | 2)`. | |

Sourcegraph also allows site admins to create pre-defined repository groupings, using [version contexts](/code-search/features#version-contexts-experimental).
Sourcegraph also allows site admins to create pre-defined repository groupings, using [search contexts](/code-search/features#search-contexts).

### Searching in non-master (unindexed) branches, tags, and commits

Expand All @@ -43,9 +43,9 @@ Sourcegraph also provides the ability to search on multiple Git revisions in a s

Oracle OpenGrok doesn't index most single-character strings (such as for special characters like `{`, `}`, `[`, `]`, `+`, `-`, and more), and non-alpha-numeric characters generally.

Sourcegraph indexes all characters, and can search for strings of any length. Using the default [literal search mode](/code-search/queries#Literal-search-default), any search (including those with special characters like `foo.bar`, `try {`, `i++`, `i-=1`, `foo->bar`, and more), will all be searchable without special handling. Using [regexp mode](/code-search/queries#regexp-search) would require escaping special characters.
Sourcegraph indexes all characters, and can search for strings of any length. Using the default [literal search mode](/code-search/queries#keyword-search-default), any search (including those with special characters like `foo.bar`, `try {`, `i++`, `i-=1`, `foo->bar`, and more), will all be searchable without special handling. Using [regexp mode](/code-search/queries#regular-expression-search) would require escaping special characters.

The only exceptions are colon characters, which are by default used for specifying a [search keyword](#search-keywords) on Sourcegraph. Any search containing colons can be done using the `content:` keyword (for example, `content:"foo::bar"`) to explicitly mark it as the search string.
The only exceptions are colon characters, which are by default used for specifying a [search keyword](#search-filters) on Sourcegraph. Any search containing colons can be done using the `content:` keyword (for example, `content:"foo::bar"`) to explicitly mark it as the search string.

### Boolean operators

Expand Down
Loading