Skip to content

Commit 326f022

Browse files
authored
DOCSP-24208 improve supplies example (#4141)
* DOCSP-24208 just added some copyable falses * made improvements * minimalism
1 parent a15bd78 commit 326f022

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

source/reference/operator/aggregation/unionWith.txt

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -90,13 +90,13 @@ SQL statement:
9090
Considerations
9191
--------------
9292

93-
Duplicates Results
93+
Duplicate Results
9494
~~~~~~~~~~~~~~~~~~
9595

9696
The combined results from the previous stage and the
9797
:pipeline:`$unionWith` stage can include duplicates.
9898

99-
For example, create a suppliers collection:
99+
For example, create a ``suppliers`` collection and a ``warehouses`` collection:
100100

101101
.. code-block:: javascript
102102

@@ -114,9 +114,8 @@ For example, create a suppliers collection:
114114
{ _id: 3, warehouse: "C", region: "East", state: "Florida" },
115115
])
116116

117-
The following aggregation which combines the results from the ``state``
118-
field projection from the ``suppliers`` collection with the results
119-
from the ``state`` field projection from the ``warehouse`` collection:
117+
The following aggregation combines the ``state`` field projection results from
118+
the ``suppliers`` and ``warehouse`` collections.
120119

121120
.. code-block:: javascript
122121

@@ -125,11 +124,11 @@ from the ``state`` field projection from the ``warehouse`` collection:
125124
{ $unionWith: { coll: "warehouses", pipeline: [ { $project: { state: 1, _id: 0 } } ]} }
126125
])
127126

128-
As can be seen from the returned documents, the result set contains
129-
duplicates:
127+
The result set contains duplicates:
130128

131129
.. code-block:: javascript
132130
:emphasize-lines: 2,5
131+
:copyable: false
133132

134133
{ "state" : "Texas" }
135134
{ "state" : "Colorado" }
@@ -152,6 +151,7 @@ group by the ``state`` field:
152151
The result set no longer contains duplicates:
153152

154153
.. code-block:: javascript
154+
:copyable: false
155155

156156
{ "_id" : "California" }
157157
{ "_id" : "Texas" }

0 commit comments

Comments
 (0)