What is the aggregation pipeline?

MongoDB and Mongoose · Freshers and experienced

Model answer

A pipeline processes documents through stages such as $match (filter), $group (summarise), $sort, $project and $lookup (join). It is used for statistics and reports, like counting jobs per status. Put $match early so indexes help and less data flows through later stages.

Learn this topic

Connect Express to MongoDB with Mongoose in the course MERN Stack Full Course: MongoDB, Express, React and Node.js.

Sign in to add your own answer.

More questions