Skip to content

Commit a98ed52

Browse files
(DOCSP-40758): Clarify document order behavior for restores (#162)
* (DOCSP-40758): Clarify document order behavior for restores * fix include name * typo * tweak * review feedback * remove unneeded include * fix duplicate heading
1 parent 2391da0 commit a98ed52

File tree

4 files changed

+20
-3
lines changed

4 files changed

+20
-3
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
By default, |tool-binary| may insert documents in a random order. To
2+
preserve document order during the restore process, use
3+
|maintain-order-flag|.

source/mongoexport/mongoexport-behavior.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,4 +68,4 @@ Learn More
6868

6969
- :ref:`mongoexport`
7070
- :ref:`mongoexport-compatibility-and-installation`
71-
- :ref:`mongoexport-examples`
71+
- :ref:`mongoexport-examples`

source/mongoimport/mongoimport-behavior.txt

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,13 @@ formatted using Extended JSON v1.0, specify the
4747
created from ``mongoexport``, you should use the
4848
corresponding version of ``mongoimport``.
4949

50+
Document Order
51+
~~~~~~~~~~~~~~
52+
53+
.. |maintain-order-flag| replace:: :option:`--maintainInsertionOrder <mongoimport --maintainInsertionOrder>`
54+
55+
.. include:: /includes/restore-document-order.rst
56+
5057
Encoding
5158
~~~~~~~~
5259

@@ -90,4 +97,4 @@ Learn More
9097

9198
- :ref:`mongoimport`
9299
- :ref:`mongoimport-compatibility-and-installation`
93-
- :ref:`mongoimport-examples`
100+
- :ref:`mongoimport-examples`

source/mongorestore/mongorestore-behavior-access-usage.txt

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,13 @@ an existing database and collection and existing documents have the
3737
same value ``_id`` field as the to-be-restored documents,
3838
``mongorestore`` will *not* overwrite those documents.
3939

40+
Document Order
41+
~~~~~~~~~~~~~~
42+
43+
.. |maintain-order-flag| replace:: :option:`--maintainInsertionOrder <mongorestore --maintainInsertionOrder>`
44+
45+
.. include:: /includes/restore-document-order.rst
46+
4047
Rebuild Indexes
4148
~~~~~~~~~~~~~~~
4249

@@ -175,4 +182,4 @@ Learn More
175182

176183
- :ref:`mongorestore`
177184
- :ref:`mongorestore-compatibility-and-installation`
178-
- :ref:`mongorestore-examples`
185+
- :ref:`mongorestore-examples`

0 commit comments

Comments
 (0)