Implement limit pushdown to mongot cursor

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Fixed
    • Priority: Major - P3
    • 7.1.0-rc0, 6.0.7, 7.0.0-rc3, 5.0.20
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Optimization
    • Fully Compatible
    • v7.0, v6.0, v5.0, v4.4
    • QO 2023-05-15
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      Rough sketch of tasks for this ticket:

      1. During parsing/desugaring, extract an appropriate limit (if possible) based on the pipeline suffix of a $search pipeline
      2. Build an $_internalMongotRemote stage with the limit
      3. Construct a mongot cursor with the extracted limit as a batch size (exact syntax will be determined by search team's spec)

      Note that this ticket does not need to handle the case where a document is filtered out by $idLookup, and thus no getMores are needed on the mongot cursor.

            Assignee:
            Militsa Sotirova
            Reporter:
            Nicholas Zolnierz
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: