Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-12756

Update documentation regarding using $lookup on array as localField

    XMLWordPrintableJSON

Details

    • Icon: Feedback Feedback
    • Resolution: Duplicate
    • Icon: Minor - P4 Minor - P4
    • Server_Docs_20231030
    • None
    • manual, Server
    • None

    Description

      Description

      I've noticed that the documentation at https://docs.mongodb.com/manual/reference/operator/aggregation/lookup/#use-lookup-with-an-array says on using $lookup with an array as local field:

      "If your localField is an array and you’d like to match the elements inside it against a foreignField which is a single element, you’ll need to $unwind the array as one stage of the aggregation pipeline."

      This is no longer true since SERVER-22821 was fixed a while ago, isn't it? AFAIK you don't need to use $unwind anymore to join an array as local field against a single foreign value.

      Scope of changes

      Impact to Other Docs

      MVP (Work and Date)

      Resources (Scope or Design Docs, Invision, etc.)

      Attachments

        Activity

          People

            Unassigned Unassigned
            fwein Frank Wein
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              4 years, 37 weeks, 2 days ago