Skip to content

Commit ba81b10

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

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
@@ -87,13 +87,13 @@ SQL statement:
8787
Considerations
8888
--------------
8989

90-
Duplicates Results
90+
Duplicate Results
9191
~~~~~~~~~~~~~~~~~~
9292

9393
The combined results from the previous stage and the
9494
:pipeline:`$unionWith` stage can include duplicates.
9595

96-
For example, create a suppliers collection:
96+
For example, create a ``suppliers`` collection and a ``warehouses`` collection:
9797

9898
.. code-block:: javascript
9999

@@ -111,9 +111,8 @@ For example, create a suppliers collection:
111111
{ _id: 3, warehouse: "C", region: "East", state: "Florida" },
112112
])
113113

114-
The following aggregation which combines the results from the ``state``
115-
field projection from the ``suppliers`` collection with the results
116-
from the ``state`` field projection from the ``warehouse`` collection:
114+
The following aggregation combines the ``state`` field projection results from
115+
the ``suppliers`` and ``warehouse`` collections.
117116

118117
.. code-block:: javascript
119118

@@ -122,11 +121,11 @@ from the ``state`` field projection from the ``warehouse`` collection:
122121
{ $unionWith: { coll: "warehouses", pipeline: [ { $project: { state: 1, _id: 0 } } ]} }
123122
])
124123

125-
As can be seen from the returned documents, the result set contains
126-
duplicates:
124+
The result set contains duplicates:
127125

128126
.. code-block:: javascript
129127
:emphasize-lines: 2,5
128+
:copyable: false
130129

131130
{ "state" : "Texas" }
132131
{ "state" : "Colorado" }
@@ -149,6 +148,7 @@ group by the ``state`` field:
149148
The result set no longer contains duplicates:
150149

151150
.. code-block:: javascript
151+
:copyable: false
152152

153153
{ "_id" : "California" }
154154
{ "_id" : "Texas" }

0 commit comments

Comments
 (0)