Explain on $lookup ("let and pipeline" form) throws

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Major - P3
    • None
    • Affects Version/s: 4.0.10
    • Component/s: Aggregation Framework
    • None
    • ALL
    • Hide

      db.getCollection("threads").explain().aggregate("'$lookup': { 'from': 'posts', 'let':

      { 'postsIds': '$Posts' }

      , 'pipeline': [ { '$match': { '$expr':

      { '$in': [ '$_id' '$$postsIds' ] }

      } } ], 'as': 'LastPosts' }")

      Show
      db.getCollection("threads").explain().aggregate("'$lookup': { 'from': 'posts', 'let': { 'postsIds': '$Posts' } , 'pipeline': [ { '$match': { '$expr': { '$in': [ '$_id' '$$postsIds' ] } } } ], 'as': 'LastPosts' }")
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      I try to get plan of my aggregation including complex lookup to figure out could it utilize index of joined collection or not.

      End even with simplified example (in selfdescribing repro) I get error "Expected 'pipeline' to be BSON docs (or equivalent), but got []interface {} instead."

            Assignee:
            Eric Sedor
            Reporter:
            Segey Gladskikh
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: