search: call zoekt early
Created by: stefanhengl
For global queries, we call zoekt before resolving and splitting repositories. The scope of this PR is limited to file
and path
results for literal search without version contexts.
Why? traces of global queries shows that a significant amount of time is spent on handling large lists of repository references. Specifically, we spent a lot of time on:
- resolving
- splitting
- serializing
For global queries, we can save time, because zoekt can simply search all shards without having to match them against a list of indexed repositories.
We still have to filter the results coming from zoekt to make sure the user sees only repositories she has access to.