Rolled out in MongoDB v6.0, the integration between MongoDB’s $lookup and Atlas Search’s $search allows us to effortlessly merge datasets based on shared fields, with the finesse of Atlas Search’s $search, enabling potent full-text search capabilities within the MongoDB ecosystem.
Picture this: you’ve got interconnected datasets, and you need to dig out specific information while ensuring efficiency. Enter $lookup and $search. By fusing these features, MongoDB lets you seamlessly navigate complex datasets. Whether you’re filtering, sorting, or hunting down specific text-based queries. It’s not just a new feature; it’s a game-changer, enhancing your MongoDB experience, making data manipulation a breeze, and ensuring your applications remain responsive and insightful.
A practical example
In this tutorial, we’ll delve into an advanced use case of MongoDB’s $lookup
aggregation stage and Atlas Search’s $search
functionality. We’ll be working with two collections: streaming_platforms
and movies_series
. The streaming_platforms
collection contains information about various streaming platforms, including subscription plans, while the movies_series
collection stores data about movies and series, including extensive details such as casting and full synopsis.
Prerequisites
- MongoDB cluster running v6.0 or later.
- Project Data Access Admin or higher access to the MongoDB Atlas project.
Collections Overview
streaming_platforms
Collection (JSON Format)