You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/50-aggregation/7-CREATE-VIEW.mdx
+9-9
Original file line number
Diff line number
Diff line change
@@ -8,12 +8,12 @@ In MongoDB, the **$merge** stage allows you to **write the results of an aggrega
8
8
9
9
The `$merge` stage enables you to store aggregation results into a different collection. If the target collection doesn’t exist, MongoDB will create it automatically.
10
10
11
-
### **Key Features:**
11
+
### **Key features:**
12
12
13
-
✔️ Inserts new documents if they don’t exist.
14
-
✔️ Updates existing documents based on `_id` or a specified field.
15
-
✔️ Can replace, merge, or discard duplicate records.
16
-
✔️ Useful for **ETL workflows, reporting tables, and maintaining summary data.**
13
+
✔️ Inserts new documents if they don’t exist
14
+
✔️ Updates existing documents based on `_id` or a specified field
15
+
✔️ Can replace, merge, or discard duplicate records
16
+
✔️ Useful for **ETL workflows, reporting tables, and maintaining summary data**
17
17
18
18
---
19
19
@@ -42,7 +42,7 @@ The `$merge` stage enables you to store aggregation results into a different col
42
42
43
43
---
44
44
45
-
## **🔹 Example 1: Creating a Summary Collection**
45
+
## **🔹 Example 1: Creating a summary collection**
46
46
47
47
👉 Suppose we want to generate a collection that contains the **total number of books per genre**.
0 commit comments