Skip to content

search: run zoekt before everything else on dotcom

Administrator requested to merge k/20220525-sequential-search into main

Created by: keegancsmith

On Sourcegraph.com not all repositories are indexed. So searcher (which does no ranking) can race with Zoekt (which does ranking). This leads to unpleasant results, especially due to the large index on Sourcegraph.com. This commit adds a SequentialJob wrapper which ensures zoekt runs before we do anything else. This is not an ideal solution, but once we resolve ranking with searcher we can remove it.

Tests change due to some tests running with OnSourcegraphDotCom set to true.

Test Plan: go test and run some manual searches in local dev with OnSourcegraphDotCom set to true.

Fixes https://github.com/sourcegraph/sourcegraph/issues/35994

Merge request reports

Loading