The first batch from mongot may not contain the full set of results for the following cases:
- A document may be filtered out by the $idLookup stage
- 16MB batch size limit (more likely with storedSource, since normally mongot only returns _id and a score)
For these cases, mongod should not need to request the full limit for the subsequent getMore. Instead, we could build a method for only requesting (limit - N) results, where N is the number of documents which made it past the $idLookup stage. The actual approach will be left up to the implementation.
Note that for storedSource queries, there is no $idLookup stage so the solution should not be tied to the presence of it. Also there is no guarantee that one of the cases above does not happen again for the subsequent getMore, so the solution should be generic and handle this.