Size docIdsToLoad appropriately in SearchService

Closes #4156