MongoDB 3.2.1 unrecognized pipeline stage name: $ lookup

I need to "join" 2 collections in MongoDB, my current version is 3.2.1, I saw that the search pipeline could do what I want, but it sent me error code 16436, exception: unrecognized pipeline stage name: $ search, and I can’t find the answer to the question on the Internet, the only message I saw was from people with the front version of MongoDB.

Here is my code:

db.coursesList.aggregate([{ $lookup: { from: 'companies', localField: 'companyId', foreignField: '_id', as: 'company' } }]); 
+5
source share

Source: https://habr.com/ru/post/1242279/


All Articles