-
MongoDB Aggregations: Identifying Popular Ingredients with $unwind and $group
In this series, we’re exploring different MongoDB aggregation operators by applying them to a collection of recipes. MongoDB Aggregations Series As part of our exploration we are imagining you’re building a recipe website. Today we want to analyze ingredient usage across all our recipes to find the most common ingredients. By using MongoDB’s $unwind and…
-
MongoDB Aggregations: Organizing Recipes by Meal Type with $group
In this series, we’re exploring different MongoDB aggregation operators by applying them to a recipe collection. I hope you’ll follow along with each post! MongoDB Aggregations Series As part of this series we are imaging you’re building a recipe website. For this post we are adding some new features to our site including allowing users…
-
MongoDB Aggregations: Finding Cooking Times with $min and $max
In this series we will explore different operators in the MongoDB Aggregation Framework via the context of a collection of recipes. MongoDB Aggregations Series Let’s say we’re making a brand new recipes website. Knowing the cooking times can help us categorize recipes into quick meals, slow-cooked dishes, or anything in between. MongoDB’s $min and $max…
-
Streamlining Document Updates with Pipelines
While you might be familiar with MongoDB’s Aggregation Framework pipelines (primarily used for crafting intricate query results), a lesser-known capability is their application in updating documents. This article will delve into the utilization of aggregation pipelines for efficient document updates. Understanding the Basics Let’s start with an example document representing a breakfast recipe: Adding Calculated…