SERVER-117906Backlog

$idLookup could be responsible for apply limit to DistributedPlanLogic

When a stage desugars with an $idLookup, it can choose to pass a limit value to be applied to the document stream. That limit only applies per-node though, so a sharded $idLookup could return N * limit documents overall, where N is the number of data-bearing nodes involved in the query. Today, $vectorSearch and $search (which desugar with an $idLookup node) compensate by being responsible themselves for adding a $limit to the DistributedPlanLogic merging pipeline. We could consider having $id

Affected Versions
Versions known to exhibit this issue

No affected versions recorded.

Fixed Versions
Versions that include the fix

No fix available yet.

Components
Server components related to this issue

No components specified.

Labels
Tags and classification
dino-extensions-apidino-searchdino-tech-debtquick-tech-debt