Skip to content

Commit 97807e1

Browse files
DOCSP-12405 fix for examples (#80)
1 parent d1d51fd commit 97807e1

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

source/reference/pipeline/lookup-stage.txt

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -117,11 +117,11 @@ Suppose there are three databases named ``sourceDB1``, ``sourceDB2``, and
117117
.. code-block:: json
118118

119119
db.catalog.insert([
120-
{ "_id" : 1, "sku" : "almonds", description: "product 1" },
121-
{ "_id" : 2, "sku" : "bread", description: "product 2" },
122-
{ "_id" : 3, "sku" : "cashews", description: "product 3" },
123-
{ "_id" : 4, "sku" : "pecans", description: "product 4" },
124-
{ "_id" : 5, "sku": null, description: "Incomplete" },
120+
{ "_id" : 1, "sku" : "almonds", "description": "product 1" },
121+
{ "_id" : 2, "sku" : "bread", "description": "product 2" },
122+
{ "_id" : 3, "sku" : "cashews", "description": "product 3" },
123+
{ "_id" : 4, "sku" : "pecans", "description": "product 4" },
124+
{ "_id" : 5, "sku": null, "description": "Incomplete" },
125125
{ "_id" : 6 }
126126
])
127127

@@ -131,11 +131,11 @@ Suppose there are three databases named ``sourceDB1``, ``sourceDB2``, and
131131
.. code-block:: json
132132

133133
db.warehouses.insert([
134-
{ "_id" : 1, "stock_item" : "almonds", warehouse: "A", "instock" : 120 },
135-
{ "_id" : 2, "stock_item" : "pecans", warehouse: "A", "instock" : 70 },
136-
{ "_id" : 3, "stock_item" : "cashews", warehouse: "B", "instock" : 60 },
137-
{ "_id" : 4, "stock_item" : "bread", warehouse: "B", "instock" : 80 },
138-
{ "_id" : 5, "stock_item" : "cookies", warehouse: "A", "instock" : 80 }
134+
{ "_id" : 1, "stock_item" : "almonds", "warehouse": "A", "instock" : 120 },
135+
{ "_id" : 2, "stock_item" : "pecans", "warehouse": "A", "instock" : 70 },
136+
{ "_id" : 3, "stock_item" : "cashews", "warehouse": "B", "instock" : 60 },
137+
{ "_id" : 4, "stock_item" : "bread", "warehouse": "B", "instock" : 80 },
138+
{ "_id" : 5, "stock_item" : "cookies", "warehouse": "A", "instock" : 80 }
139139
])
140140

141141
The following examples use the :manual:`$lookup
@@ -195,15 +195,15 @@ The following aggregation operation on the ``sourceDB1.orders`` collection joins
195195
}
196196
},
197197
{
198-
$project : { instock: 1, _id: 0}
198+
$project : { "instock": 1, "_id": 0}
199199
}
200200
],
201201
as: "wh"
202202
}
203203
},
204204
{ "$unwind": "$wh" },
205205
{
206-
$project : { description: 1, instock: "$wh.instock", _id: 0}
206+
$project : { "description": 1, "instock": "$wh.instock", "_id": 0}
207207
}
208208
],
209209
as: "inventory"

0 commit comments

Comments
 (0)