Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-21612

Combine post $lookup $match on looked up field

    • Fully Compatible
    • Query 11 (03/14/16), Query 12 (04/04/16), Query 13 (04/22/16), Query 14 (05/13/16)

      In the scenario where the agg pipeline is:

      {$lookup:{from:"c2",localField:"foo",foreignField:"bar",as:"c2s"}},
      {$unwind:"$c2s"},
      {$match:{"c2s.f2":someValue}}
      

      we should be able to merge the query for f2:someValue into the query into "c2" as find:{bar:"$foo", f2:someValue} as a performance optimization.

            Assignee:
            benjamin.murphy Benjamin Murphy
            Reporter:
            asya.kamsky@mongodb.com Asya Kamsky
            Votes:
            1 Vote for this issue
            Watchers:
            11 Start watching this issue

              Created:
              Updated:
              Resolved: