Timeouts for global search regression
Problem
As discovered in #244276 (comment 411903963) global searches time out when using Elasticsearch now. This is due to loading too many project IDs from the DB. This is a regression that was introduced in !38095 (merged)
Solution
Per !38095 (comment 412661217) we need to revert some of the changes that were made in that MR. There were optimizations necessary to avoid loading too many project IDs from the DB. That MR also refactored quite a bit of related code though that may need further refactoring to fix this regression now since we can't just revert part of those changes.
Edited by Dylan Griffith