Skip to content

wip: support visibility queries

Warren Gifford requested to merge master-dry-run/sh/visibility into main

Created by: stefanhengl

This changes how we treat global queries for indexed search.

Before: We resolved repos and searched Zoekt concurrenty. Once the repos were resolved, we filtered the results coming back from Zoekt before streaming them back to the user. This approach was performant but still had the caveat of having to resolve all public repos (O(#index)).

Now: We send 2 queries to Zoekt: One query targeting public repositories and one query targeting all private repos a user has access to. Since we know that results from the first query only contain public results, we can stream them back immediately without authorization check, which will improve the "time to first result".

Why? Repo resolution is a major bottleneck for our efforts to increase the the number of indexed repos. With this change we can avoid large repo lists and remove repoPromises (future PR) we introduced earlier.

Merge request reports

Loading