Skip to content

Commit 08259c7

Browse files
authored
DOCSP-26183 replaces :doc: with improved admonitions (#2080)
1 parent d64d453 commit 08259c7

19 files changed

+109
-111
lines changed

source/core/document.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ Query filter documents specify the conditions that determine which
302302
records to select for read, update, and delete operations.
303303

304304
You can use ``<field>:<value>`` expressions to specify the equality
305-
condition and :doc:`query operator </reference/operator/query>`
305+
condition and :ref:`query operator <query-projection-operators-top>`
306306
expressions.
307307

308308
.. code-block:: javascript

source/includes/extracts-views.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,8 @@ content: |
2121
---
2222
ref: views-unsupported-projection-operators
2323
content: |
24-
:method:`~db.collection.find()` operations on views do not support
25-
the following :doc:`projection </reference/operator/projection>`
26-
operators:
24+
:method:`~db.collection.find()` operations on views do not support
25+
the following :ref:`query-projection-operators-top` operators:
2726
2827
- :projection:`$`
2928
- :projection:`$elemMatch`

source/legacy-opcodes.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -544,7 +544,7 @@ format of a OP_UPDATE message is the following:
544544
* - ``update``
545545

546546
- BSON document that specifies the update to be performed. For
547-
information on specifying updates see the :doc:`Update
548-
Operations </tutorial/update-documents/>` documentation.
547+
information on specifying updates see the :ref:`Update
548+
Operations <update-operators>` documentation.
549549

550550
There is no response to an OP_UPDATE message.

source/reference/bios-example-collection.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
:orphan:
22

3+
.. _bios-example-collection:
4+
35
===============================
46
The ``bios`` Example Collection
57
===============================

source/reference/command/mapReduce.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,9 +122,9 @@ The command takes the following fields as arguments:
122122
- document
123123
- .. _cmd-mapreduce-query:
124124

125-
Optional. Specifies the selection criteria using :doc:`query operators
126-
</reference/operator>` for determining the documents input to the
127-
``map`` function.
125+
Optional. Specifies the selection criteria using :ref:`query operators
126+
<query-projection-operators-top>` for determining the documents
127+
input to the ``map`` function.
128128

129129
* - :ref:`sort <cmd-mapreduce-sort>`
130130
- document

source/reference/method/db.collection.deleteMany.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ Definition
4848

4949
- .. _deleteMany-filter:
5050

51-
Specifies deletion criteria using :doc:`query operators
52-
</reference/operator>`.
51+
Specifies deletion criteria using :ref:`query operators
52+
<query-selectors>`.
5353

5454
To delete all documents in a collection, pass in an empty document (``{ }``).
5555

@@ -61,8 +61,8 @@ Definition
6161

6262
- .. _deleteMany-wc:
6363

64-
Optional. A document expressing the :doc:`write concern
65-
</reference/write-concern>`. Omit to use the default write concern.
64+
Optional. A document expressing the :ref:`write concern
65+
<write-concern>`. Omit to use the default write concern.
6666

6767
.. include:: /includes/extracts/transactions-operations-write-concern.rst
6868

@@ -84,8 +84,8 @@ Definition
8484

8585
- .. _deleteMany-hint:
8686

87-
Optional. A document or string that specifies the :doc:`index
88-
</indexes>` to use to support the :ref:`query predicate
87+
Optional. A document or string that specifies the index
88+
to use to support the :ref:`query predicate
8989
<deleteMany-filter>`.
9090

9191
The option can take an index specification document or the

source/reference/method/db.collection.find.txt

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,10 @@ Definition
3838

3939
- .. _method-find-query:
4040

41-
Optional. Specifies selection filter using :doc:`query operators
42-
</reference/operator>`. To return all documents in a collection, omit
43-
this parameter or pass an empty document (``{}``).
41+
Optional. Specifies selection filter using :ref:`query
42+
operators <query-projection-operators-top>`. To return all
43+
documents in a collection, omit this parameter or pass an
44+
empty document (``{}``).
4445

4546

4647

@@ -217,8 +218,8 @@ Client Disconnection
217218
Examples
218219
--------
219220

220-
The examples in this section use documents from the :doc:`bios
221-
collection </reference/bios-example-collection>` where the documents
221+
The examples in this section use documents from the :ref:`bios
222+
collection <bios-example-collection>` where the documents
222223
generally have the form:
223224

224225
.. code-block:: javascript
@@ -236,7 +237,7 @@ generally have the form:
236237
}
237238

238239
To create and populate the ``bios`` collection, see
239-
:doc:`/reference/bios-example-collection`.
240+
:ref:`bios collection <bios-example-collection>`.
240241

241242
Find All Documents in a Collection
242243
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

source/reference/method/db.collection.findOne.txt

Lines changed: 19 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@ Definition
2121

2222

2323
Returns one document that satisfies the specified query criteria on
24-
the collection or :doc:`view </core/views>`. If multiple documents
25-
satisfy the query, this method returns the first document according
26-
to the :term:`natural order` which reflects the order of documents
27-
on the disk. In :term:`capped collections <capped collection>`,
28-
natural order is the same as insertion order. If no document
29-
satisfies the query, the method returns null.
24+
the collection or :ref:`view <views-landing-page>`. If multiple
25+
documents satisfy the query, this method returns the first document
26+
according to the :term:`natural order` which reflects the order of
27+
documents on the disk. In :term:`capped collections
28+
<capped collection>`, natural order is the same as insertion order.
29+
If no document satisfies the query, the method returns null.
3030

3131

3232
.. list-table::
@@ -43,7 +43,8 @@ Definition
4343

4444
- document
4545

46-
- Optional. Specifies query selection criteria using :doc:`query operators </reference/operator>`.
46+
- Optional. Specifies query selection criteria using
47+
:ref:`query operators <query-projection-operators-top>`.
4748

4849

4950

@@ -52,7 +53,7 @@ Definition
5253
- document
5354

5455
- Optional. Specifies the fields to return using
55-
:doc:`projection operators </reference/operator/projection>`.
56+
:ref:`projection operators <query-projection-operators-top>`.
5657
Omit this parameter to return all fields in the matching
5758
document. For details, see :ref:`findOne-projection`.
5859

@@ -143,7 +144,7 @@ With Empty Query Specification
143144
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
144145

145146
The following operation returns a single document from
146-
the :doc:`bios collection </reference/bios-example-collection>`:
147+
the :ref:`bios collection <bios-example-collection>`:
147148

148149
.. code-block:: javascript
149150

@@ -153,9 +154,9 @@ With a Query Specification
153154
~~~~~~~~~~~~~~~~~~~~~~~~~~
154155

155156
The following operation returns the first matching document from the
156-
:doc:`bios collection </reference/bios-example-collection>` where either
157-
the field ``first`` in the embedded document ``name`` starts with the letter
158-
``G`` **or** where the field ``birth`` is less than ``new
157+
bios collection where either the field ``first`` in the embedded
158+
document ``name`` starts with the letter ``G`` **or** where the field
159+
``birth`` is less than ``new
159160
Date('01/01/1945')``:
160161

161162
.. code-block:: javascript
@@ -179,9 +180,8 @@ unless the exclude is for the ``_id`` field.
179180
Specify the Fields to Return
180181
````````````````````````````
181182

182-
The following operation finds a document in the :doc:`bios collection
183-
</reference/bios-example-collection>` and returns only the ``name``,
184-
``contribs`` and ``_id`` fields:
183+
The following operation finds a document in the bios collection and
184+
returns only the ``name``, ``contribs`` and ``_id`` fields:
185185

186186
.. code-block:: javascript
187187

@@ -193,11 +193,10 @@ The following operation finds a document in the :doc:`bios collection
193193
Return All but the Excluded Fields
194194
``````````````````````````````````
195195

196-
The following operation returns a document in the :doc:`bios collection
197-
</reference/bios-example-collection>` where the ``contribs`` field
198-
contains the element ``OOP`` and returns all fields *except* the ``_id``
199-
field, the ``first`` field in the ``name`` embedded document, and the
200-
``birth`` field:
196+
The following operation returns a document in the bios collection
197+
where the ``contribs`` field contains the element ``OOP`` and returns
198+
all fields *except* the ``_id`` field, the ``first`` field in the
199+
``name`` embedded document, and the ``birth`` field:
201200

202201
.. code-block:: javascript
203202

source/reference/method/db.collection.mapReduce.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,8 @@ The following table describes additional arguments that
140140

141141
- document
142142

143-
- Specifies the selection criteria using :doc:`query operators
144-
</reference/operator>` for determining the documents input to the
143+
- Specifies the selection criteria using :ref:`query operators
144+
<query-selectors>` for determining the documents input to the
145145
``map`` function.
146146

147147

source/reference/method/db.collection.remove.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ Definition
6262

6363
- document
6464

65-
- Specifies deletion criteria using :doc:`query operators
66-
</reference/operator>`. To delete all documents in a collection,
65+
- Specifies deletion criteria using :ref:`query operators
66+
<query-selectors>`. To delete all documents in a collection,
6767
pass an empty document (``{}``).
6868

6969
* - ``justOne``

source/reference/method/db.collection.update.txt

Lines changed: 21 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -143,9 +143,9 @@ parameters:
143143

144144
- .. _update-wc:
145145

146-
Optional. A document expressing the :doc:`write concern
147-
</reference/write-concern>`. Omit to use the default write
148-
concern ``w: 1``.
146+
Optional. A document expressing the :ref:`write concern
147+
<write-concern>`. Omit to use the default write concern
148+
``w: 1``.
149149

150150
.. include:: /includes/extracts/transactions-operations-write-concern.rst
151151

@@ -192,8 +192,8 @@ parameters:
192192

193193
- .. _update-hint:
194194

195-
Optional. A document or string that specifies the :doc:`index
196-
</indexes>` to use to support the :ref:`query predicate
195+
Optional. A document or string that specifies the :ref:`index
196+
<indexes>` to use to support the :ref:`query predicate
197197
<update-query>`.
198198

199199
The option can take an index specification document or the index
@@ -313,9 +313,9 @@ To modify the **existing** shard key value with
313313
- You :red:`must` run on a :binary:`~bin.mongos`. Do :red:`not`
314314
issue the operation directly on the shard.
315315

316-
- You :red:`must` run either in a :doc:`transaction
317-
</core/transactions>` or as a :doc:`retryable write
318-
</core/retryable-writes>`.
316+
- You :red:`must` run either in a :ref:`transaction
317+
<transactions>` or as a :ref:`retryable write
318+
<retryable-writes>`.
319319

320320
- You :red:`must` specify ``multi: false``.
321321

@@ -359,9 +359,9 @@ In addition, the following requirements also apply:
359359

360360
* - To set to a non-``null`` value
361361

362-
- - :red:`Must` be performed either inside a :doc:`transaction
363-
</core/transactions>` or as a :doc:`retryable write
364-
</core/retryable-writes>`.
362+
- - :red:`Must` be performed either inside a :ref:`transaction
363+
<transactions>` or as a :ref:`retryable write
364+
<retryable-writes>`.
365365

366366
- :red:`Must` specify ``multi: false``.
367367

@@ -519,7 +519,7 @@ The following tabs showcase a variety of common
519519
.. seealso::
520520

521521
:update:`$set`, :update:`$inc`,
522-
:doc:`/reference/operator/update`,
522+
:ref:`update operators <update-operators>`
523523
:ref:`dot notation <document-dot-notation>`
524524

525525
.. tab:: Arrays
@@ -616,7 +616,7 @@ The following tabs showcase a variety of common
616616

617617
.. seealso::
618618

619-
:update:`$unset`, :update:`$rename`, :doc:`/reference/operator/update`
619+
:update:`$unset`, :update:`$rename`, :ref:`update operators <update-operators>`
620620

621621
.. tab:: Multiple
622622
:tabid: update-multiple
@@ -811,7 +811,7 @@ with :method:`~db.collection.update()`.
811811
from the equality clauses in the ``<query>`` parameter and
812812
applies the expressions from the ``<update>`` parameter.
813813

814-
:doc:`Comparison </reference/operator/query>` operations from
814+
:ref:`Comparison <query-projection-operators-top>` operations from
815815
the ``<query>`` will not be included in the new document. If
816816
the new document does not include the ``_id`` field, MongoDB
817817
adds the ``_id`` field with an :ref:`objectid` value.
@@ -1049,10 +1049,9 @@ Update with Aggregation Pipeline
10491049
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
10501050

10511051
Starting in MongoDB 4.2, the :method:`db.collection.update()` method
1052-
can accept an :doc:`aggregation pipeline
1053-
</core/aggregation-pipeline>` ``[ <stage1>, <stage2>, ... ]`` that
1054-
specifies the modifications to perform. The pipeline can consist of
1055-
the following stages:
1052+
can accept an :ref:`aggregation pipeline <aggregation-pipeline>`
1053+
``[ <stage1>, <stage2>, ... ]`` that specifies the modifications to
1054+
perform. The pipeline can consist of the following stages:
10561055

10571056
.. include:: /includes/list-update-agg-stages.rst
10581057

@@ -1124,7 +1123,7 @@ After the command, the collection contains the following documents:
11241123

11251124
.. seealso::
11261125

1127-
:doc:`/tutorial/update-documents-with-aggregation-pipeline`
1126+
:ref:`updates-agg-pipeline`
11281127

11291128
Perform Conditional Updates Based on Current Field Values
11301129
`````````````````````````````````````````````````````````
@@ -1197,7 +1196,7 @@ After the command, the collection contains the following documents:
11971196

11981197
.. seealso::
11991198

1200-
:doc:`/tutorial/update-documents-with-aggregation-pipeline`
1199+
:ref:`updates-agg-pipeline`
12011200

12021201
.. _update-arrayFilters:
12031202

@@ -1402,8 +1401,8 @@ Use Variables in ``let``
14021401
Override Default Write Concern
14031402
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
14041403

1405-
The following operation to a replica set specifies a :doc:`write concern
1406-
</reference/write-concern>` of ``w: 2`` with a ``wtimeout`` of 5000
1404+
The following operation to a replica set specifies a :ref:`write concern
1405+
<write-concern>` of ``w: 2`` with a ``wtimeout`` of 5000
14071406
milliseconds. This operation either returns after the write propagates
14081407
to both the primary and one secondary, or times out after 5 seconds.
14091408

source/reference/operator/aggregation-pipeline.txt

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ Aggregation Pipeline Stages
77
.. default-domain:: mongodb
88

99
In the :method:`db.collection.aggregate` method and
10-
:method:`db.aggregate` method, :doc:`pipeline
11-
</core/aggregation-pipeline>` stages appear in an array. Documents pass
10+
:method:`db.aggregate` method, :ref:`pipeline
11+
<aggregation-pipeline>` stages appear in an array. Documents pass
1212
through the stages in sequence.
1313

1414
Stages
@@ -29,7 +29,7 @@ and :pipeline:`$changeStream` stages can appear multiple times in a pipeline.
2929
.. include:: /includes/extracts/agg-stages-db.collection.aggregate.rst
3030

3131
For aggregation expression operators to use in the pipeline stages, see
32-
:doc:`/reference/operator/aggregation`.
32+
:ref:`aggregation-pipeline-operator-reference`.
3333

3434
``db.aggregate()`` Stages
3535
~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -216,8 +216,8 @@ Alphabetical Listing of Stages
216216

217217
* - :pipeline:`$planCacheStats`
218218

219-
- Returns :doc:`plan cache </core/query-plans>` information for a
220-
collection.
219+
- Returns :ref:`plan cache <query-plans-query-optimization>`
220+
information for a collection.
221221

222222

223223
* - :pipeline:`$project`
@@ -260,7 +260,7 @@ Alphabetical Listing of Stages
260260
- Randomly selects the specified number of documents from its input.
261261

262262

263-
* - :doc:`$search </reference/operator/aggregation/search>`
263+
* - :pipeline:`$search`
264264

265265
- Performs a full-text search of the field or fields in an Atlas
266266
collection.
@@ -273,7 +273,7 @@ Alphabetical Listing of Stages
273273
To learn more, see :atlas:`Atlas Search Aggregation Pipeline
274274
Stages </reference/atlas-search/query-syntax>`.
275275

276-
* - :doc:`$searchMeta </reference/operator/aggregation/searchMeta>`
276+
* - :pipeline:`$searchMeta`
277277

278278
- Returns different types of :ref:`metadata result
279279
<fts-metadata-results>` documents for the :atlas:`Atlas Search

0 commit comments

Comments
 (0)