Skip to content

Commit 79fdada

Browse files
committed
DOCSP-15419 fix tab titles with ellipses
1 parent b4181a7 commit 79fdada

File tree

4 files changed

+140
-96
lines changed

4 files changed

+140
-96
lines changed

source/core/replica-set-sync.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ the list of all replica set members:
122122

123123
.. tabs::
124124

125-
.. tab:: Sync Source Selection (First Pass)
125+
.. tab:: First Pass
126126
:tabid: firstpass
127127

128128
The member applies the following criteria to each replica
@@ -164,7 +164,7 @@ the list of all replica set members:
164164
the member performs a second pass with relaxed criteria.
165165
See :guilabel:`Sync Source Selection (Second Pass)`.
166166

167-
.. tab:: Sync Source Selection (Second Pass)
167+
.. tab:: Second Pass
168168
:tabid: second pass
169169

170170
The member applies the following criteria to each replica
@@ -293,7 +293,7 @@ through the list of all replica set members:
293293

294294
.. tabs::
295295

296-
.. tab:: Sync Source Selection (First Pass)
296+
.. tab:: First Pass
297297
:tabid: firstpass
298298

299299
The member applies the following criteria to each replica
@@ -334,7 +334,7 @@ through the list of all replica set members:
334334
the member performs a second pass with relaxed criteria.
335335
See the :guilabel:`Sync Source Selection (Second Pass)`.
336336

337-
.. tab:: Sync Source Selection (Second Pass)
337+
.. tab:: Second Pass
338338
:tabid: second pass
339339

340340
The member applies the following criteria to each replica

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

Lines changed: 47 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -389,11 +389,17 @@ Write Concerns and Transactions
389389
Examples
390390
--------
391391

392+
The following tabs showcase a variety of common
393+
:method:`~db.collection.update()` operations.
394+
392395
.. tabs::
393396

394-
.. tab:: Use Update Operator Expressions ($inc, $set)
397+
.. tab:: Set
395398
:tabid: op-expr
396399

400+
Use Update Operator Expressions (``$inc`` and ``$set``)
401+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
402+
397403
.. include:: /includes/fact-update-example-docs-intro.rst
398404

399405
.. include:: /includes/fact-update-example-docs.rst
@@ -492,9 +498,12 @@ Examples
492498
:doc:`/reference/operator/update`,
493499
:ref:`dot notation <document-dot-notation>`
494500

495-
.. tab:: Push Elements to Existing Array
501+
.. tab:: Arrays
496502
:tabid: push-elements-existing-array
497503

504+
Push Elements to Existing Array (``$push``)
505+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
506+
498507
.. include:: /includes/fact-update-example-docs-intro.rst
499508

500509
.. include:: /includes/fact-update-example-docs.rst
@@ -541,9 +550,12 @@ Examples
541550

542551
:update:`$push`
543552

544-
.. tab:: Remove Fields ($unset)
553+
.. tab:: Unset
545554
:tabid: remove-fields
546555

556+
Remove Fields (``$unset``)
557+
~~~~~~~~~~~~~~~~~~~~~~~~~~
558+
547559
.. include:: /includes/fact-update-example-docs-intro.rst
548560

549561
.. include:: /includes/fact-update-example-docs.rst
@@ -590,9 +602,12 @@ Examples
590602

591603
:update:`$unset`, :update:`$rename`, :doc:`/reference/operator/update`
592604

593-
.. tab:: Replace Entire Document
605+
.. tab:: Replace
594606
:tabid: replace-doc
595607

608+
Replace Entire Document (``$update``)
609+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
610+
596611
.. include:: /includes/fact-update-example-docs-intro.rst
597612

598613
.. include:: /includes/fact-update-example-docs.rst
@@ -664,9 +679,12 @@ Examples
664679
150,
665680
"baking,cooking")
666681

667-
.. tab:: Update Multiple Documents
682+
.. tab:: Multiple
668683
:tabid: update-multiple
669684

685+
Update Multiple Documents (``$update`` With ``multi``)
686+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
687+
670688
.. include:: /includes/fact-update-example-docs-intro.rst
671689

672690
.. include:: /includes/fact-update-example-docs.rst
@@ -769,11 +787,17 @@ include the full shard key in the ``filter``. For additional
769787
:method:`db.collection.update()` behavior on a sharded collection, see
770788
:ref:`update-sharded-collection`.
771789

790+
The following tabs showcase a variety of uses of the ``upsert`` modifier
791+
with :method:`~db.collection.update()`.
792+
772793
.. tabs::
773794

774-
.. tab:: Upsert with Replacement Document
795+
.. tab:: Replace
775796
:tabid: upsert-example
776797

798+
Upsert with Replacement Document
799+
````````````````````````````````
800+
777801
If no document matches the query criteria and the ``<update>``
778802
parameter is a replacement document (i.e., contains only field
779803
and value pairs), the update inserts a new document with the
@@ -840,9 +864,12 @@ include the full shard key in the ``filter``. For additional
840864
"tags" : [ "database" ]
841865
}
842866

843-
.. tab:: Upsert with Operator Expressions
867+
.. tab:: Set
844868
:tabid: upsert-op-expr
845869

870+
Upsert with Operator Expressions (``$set``)
871+
```````````````````````````````````````````
872+
846873
If no document matches the query criteria and the ``<update>``
847874
parameter is a document with :ref:`update operator expressions
848875
<update-operators>`, then the operation creates a base document
@@ -885,9 +912,12 @@ include the full shard key in the ``filter``. For additional
885912

886913
:update:`$setOnInsert`
887914

888-
.. tab:: Aggregation Pipeline using Upsert
915+
.. tab:: Aggregation
889916
:tabid: agg-pipeline-upsert
890917

918+
Upsert using an Aggregation Pipeline
919+
````````````````````````````````````
920+
891921
If the ``<update>`` parameter is an :ref:`aggregation pipeline
892922
<update-behavior-agg-pipeline>`, the update creates a base
893923
document from the equality clauses in the ``<query>``
@@ -942,11 +972,11 @@ include the full shard key in the ``filter``. For additional
942972
For additional examples of updates using
943973
aggregation pipelines, see :ref:`update-behavior-agg-pipeline`.
944974

945-
.. tab:: Combine Upsert and Multi Options
975+
.. tab:: Multiple
946976
:tabid: combine-upsert-multi
947977

948-
Combine Upsert and Multi Options (Match)
949-
````````````````````````````````````````
978+
Using ``upsert`` with ``multi`` (Match)
979+
```````````````````````````````````````
950980

951981
From the :binary:`~bin.mongo` shell, insert the following
952982
documents into a ``books`` collection:
@@ -1007,8 +1037,8 @@ include the full shard key in the ``filter``. For additional
10071037
"tags" : [ "literature", "translated" ]
10081038
}
10091039

1010-
Combine Upsert and Multi Options (No Match)
1011-
```````````````````````````````````````````
1040+
Using ``upsert`` with ``multi`` (No Match)
1041+
``````````````````````````````````````````
10121042

10131043
If the collection had *no* matching document, the operation
10141044
would result in the insertion of a single document using the
@@ -1038,9 +1068,12 @@ include the full shard key in the ``filter``. For additional
10381068
"tags" : [ "literature", "hardcover" ]
10391069
}
10401070

1041-
.. tab:: Upsert with Dotted _id Query
1071+
.. tab:: Dotted ``_id``
10421072
:tabid: upsert-dotted-id
10431073

1074+
Upsert with Dotted ``_id`` Query
1075+
````````````````````````````````
1076+
10441077
.. include:: /includes/fact-upsert-id.rst
10451078

10461079
The ``WriteResult`` of the operation returns the following

source/reference/method/sh.updateZoneKeyRange.txt

Lines changed: 84 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -198,8 +198,8 @@ the appropriate permissions for issuing :method:`sh.updateZoneKeyRange()`. See
198198
the documentation page for :ref:`Role-Based Access Control <authorization>`
199199
for more information.
200200

201-
Example
202-
-------
201+
Examples
202+
--------
203203

204204
Given a sharded collection ``exampledb.collection`` with a shard key of ``{ a
205205
: 1 }``, the following operation creates a range with a lower bound of ``1``
@@ -276,85 +276,94 @@ initial chunk creation and distribution. See
276276
:ref:`updateZoneKeyRange-method-init-chunk-distribution-compound-hashed`
277277
for more information.
278278

279-
Each of the following tabs contains an example specific to the
280-
described shard key type:
279+
The sections below contain examples for three different shard key types.
281280

282-
.. tabs::
281+
Consider the following examples, which explore pre-defining zones or
282+
zone ranges for three different shard key types:
283+
284+
- :ref:`updatezonekeyrange-single-or-compound-example`
285+
- :ref:`updatezonekeyrange-compound-prefix-hashed-example`
286+
- :ref:`updatezonekeyrange-compound-non-prefix-hashed-example`
287+
288+
.. _updatezonekeyrange-single-or-compound-example:
289+
290+
Single or Compound Shard Keys
291+
`````````````````````````````
283292

284-
.. tab:: Single or Compound Shard Keys
285-
:tabid: single-or-compound
293+
.. note::
286294

287-
.. note::
288-
289-
The content in this tab only applies to single-field or
290-
compound shard keys *without* a hashed field.
295+
This example only applies to single-field or compound shard keys
296+
*without* a hashed field.
291297

292-
For example, ``{ "zip" : 1 }`` or
293-
``{ "zip" : 1, "account" : 1}``
294-
295-
.. include:: /includes/steps/zones-initial-chunk-distribution-single-compound.rst
296-
297-
.. tab:: Compound Hashed Shard Key with Hashed Prefix
298-
:tabid: compound-hashed
299-
300-
.. note::
301-
302-
The content in this tab only applies to compound hashed shard
303-
keys where the hashed field is the prefix of the shard key (i.e.
304-
the first field in the shard key is hashed).
305-
306-
For example, ``{ "_id" : "hashed", "facility" : 1 }``
307-
308-
Starting in version 4.4, MongoDB supports sharding collections on
309-
:ref:`compound hashed indexes <index-type-compound-hashed>`. When
310-
sharding on a compound hashed shard key, MongoDB can perform
311-
optimized initial chunk creation and distribution on the empty or
312-
non-existing collection *only if* the defined zone ranges meet
313-
:ref:`additional requirements
314-
<updateZoneKeyRange-method-init-chunk-distribution>`.
315-
316-
Consider an empty collection ``examples.metrics`` which will store
317-
analytics from one of two manufacturing facilities. The
318-
planned shard key is ``{ "_id" : "hashed", "facility" : 1}``,
319-
where the hashed field is the shard key *prefix*.
298+
For example, ``{ "zip" : 1 }`` or
299+
``{ "zip" : 1, "account" : 1}``
300+
301+
.. include:: /includes/steps/zones-initial-chunk-distribution-single-compound.rst
302+
303+
.. _updatezonekeyrange-compound-prefix-hashed-example:
304+
305+
Compound Hashed Shard Key with Hashed Prefix
306+
````````````````````````````````````````````
307+
308+
.. note::
309+
310+
This example only applies to compound hashed shard keys where the
311+
hashed field is the prefix of the shard key (i.e. the first field in
312+
the shard key is hashed).
313+
314+
For example, ``{ "_id" : "hashed", "facility" : 1 }``
315+
316+
Starting in version 4.4, MongoDB supports sharding collections on
317+
:ref:`compound hashed indexes <index-type-compound-hashed>`. When
318+
sharding on a compound hashed shard key, MongoDB can perform
319+
optimized initial chunk creation and distribution on the empty or
320+
non-existing collection *only if* the defined zone ranges meet
321+
:ref:`additional requirements
322+
<updateZoneKeyRange-method-init-chunk-distribution>`.
323+
324+
Consider an empty collection ``examples.metrics`` which will store
325+
analytics from one of two manufacturing facilities. The
326+
planned shard key is ``{ "_id" : "hashed", "facility" : 1}``,
327+
where the hashed field is the shard key *prefix*.
320328

321-
.. include:: /includes/steps/zones-initial-chunk-distribution-compound-hashed-prefix.rst
322-
323-
.. tab:: Compound Hashed Shard Key with Non-Prefix Hashed Field
324-
:tabid: compound-hashed-no-prefix
325-
326-
.. note::
327-
328-
The content in this tab only applies to compound hashed shard
329-
keys where the hashed field is *not* the prefix of the shard key
330-
(i.e. the first field in the shard key is not hashed).
331-
332-
For example, ``{ "facility" : 1, "_id" : "hashed" }``
333-
334-
Starting in version 4.4, MongoDB supports sharding collections on
335-
:ref:`compound hashed indexes <index-type-compound-hashed>`. When
336-
sharding on a compound hashed shard key, MongoDB can perform
337-
optimized initial chunk creation and distribution on the empty or
338-
non-existing collection *only if* the defined zone ranges meet
339-
:ref:`additional requirements
340-
<updateZoneKeyRange-method-init-chunk-distribution>`.
341-
342-
Consider an empty collection ``examples.metrics`` which will store
343-
analytics from one of two manufacturing facilities. The planned
344-
shard key is ``{ "facility" : 1, "_id" : "hashed" }``, where
345-
the hashed field is *not* the shard key prefix.
346-
347-
- The ``facility`` field stores the name of the facility:
348-
``"FacilityAlpha"`` or ``"FacilityBaker"``. The
349-
collection requires zone ranges on ``facility`` to help isolate
350-
data for each facility to specific shards.
351-
352-
- The ``_id`` field compensates for the low-cardinality of the
353-
``facility`` field. Hashing compensates for the
354-
monotonically-increasing nature of the ``_id`` field.
355-
356-
.. include:: /includes/steps/zones-initial-chunk-distribution-compound-hashed-non-prefix.rst
329+
.. include:: /includes/steps/zones-initial-chunk-distribution-compound-hashed-prefix.rst
330+
331+
.. _updatezonekeyrange-compound-non-prefix-hashed-example:
332+
333+
Compound Hashed Shard Key with Non-Prefix Hashed Field
334+
``````````````````````````````````````````````````````
357335

336+
.. note::
337+
338+
This example only applies to compound hashed shard keys where the
339+
hashed field is *not* the prefix of the shard key (i.e. the first
340+
field in the shard key is not hashed).
341+
342+
For example, ``{ "facility" : 1, "_id" : "hashed" }``
343+
344+
Starting in version 4.4, MongoDB supports sharding collections on
345+
:ref:`compound hashed indexes <index-type-compound-hashed>`. When
346+
sharding on a compound hashed shard key, MongoDB can perform
347+
optimized initial chunk creation and distribution on the empty or
348+
non-existing collection *only if* the defined zone ranges meet
349+
:ref:`additional requirements
350+
<updateZoneKeyRange-method-init-chunk-distribution>`.
351+
352+
Consider an empty collection ``examples.metrics`` which will store
353+
analytics from one of two manufacturing facilities. The planned
354+
shard key is ``{ "facility" : 1, "_id" : "hashed" }``, where
355+
the hashed field is *not* the shard key prefix.
356+
357+
- The ``facility`` field stores the name of the facility:
358+
``"FacilityAlpha"`` or ``"FacilityBaker"``. The
359+
collection requires zone ranges on ``facility`` to help isolate
360+
data for each facility to specific shards.
361+
362+
- The ``_id`` field compensates for the low-cardinality of the
363+
``facility`` field. Hashing compensates for the
364+
monotonically-increasing nature of the ``_id`` field.
365+
366+
.. include:: /includes/steps/zones-initial-chunk-distribution-compound-hashed-non-prefix.rst
358367

359368
.. seealso::
360369

0 commit comments

Comments
 (0)