Skip to content

Search Jobs: document new ENVs #1092

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 22, 2025
Merged
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
10 changes: 10 additions & 0 deletions docs/code-search/types/search-jobs.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,16 @@ If the `blobstore` service is deployed, and you want to use it to store results

To use a third party managed object storage service, see instructions in [externalizing object storage](../../admin/external_services/object_storage#search-job-results).

### Environment Variables

You can configure Search Jobs behavior using the following environment variables on the worker service:

| Environment Variable | Default Value | Description |
| --- | --- | --- |
| `SRC_SEARCH_JOB_WORKER_INTERVAL` | `1s` | Controls how frequently the system checks for new search jobs to process. You probably don't need to configure this.|
| `SRC_SEARCH_JOB_MAXIMUM_RUNTIME_PER_JOB` | `5h` | Sets a maximum time limit for how long a search job can run per repository-revision pair. Note that a search job is run as a collection of many smaller searches, each targeting a single revision of a repository. This ENV targets the maximum runtime of individual searches.|
| `SRC_SEARCH_JOB_NUM_HANDLERS` | `5` | Adjusts how many searches can run in parallel. A value of 5 (default) means that 5 searches, each targeting a different repository-revision pair, can run in parallel. More handlers put more pressure on the backend, particularly on Searcher and Zoekt. Make sure you have sufficient resources before increasing the number of handlers. |

## Supported result types

Search jobs supports the following result types:
Expand Down