Use traversal ids in Elasticsearch project search query
Background
The project search query currently has a filter which contains a list of all projects that should the user has access to. Other scopes make use of traversal ids by doing a prefixed match and only excluding projects that should not be visible. We found namespaces that contain 30K+ projects which leads to a massive query being called up from postgres (leading to a long database duration) and sent to ES (leading to a long running ES query). This has a negative effect on the Global Search error budget.
Proposal
Update the advanced project search query to use traversal ids to filter for project visibility. The field is already indexed in the projects index so it only requires a query update.