Skip to content

Commit e23a70c

Browse files
committed
DOCSP-15419 fix tab titles with ellipses
1 parent 18992ab commit e23a70c

File tree

5 files changed

+155
-100
lines changed

5 files changed

+155
-100
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
@@ -406,11 +406,17 @@ Write Concerns and Transactions
406406
Examples
407407
--------
408408

409+
The following tabs showcase a variety of common
410+
:method:`~db.collection.update()` operations.
411+
409412
.. tabs::
410413

411-
.. tab:: Use Update Operator Expressions ($inc, $set)
414+
.. tab:: Set
412415
:tabid: op-expr
413416

417+
Use Update Operator Expressions (``$inc`` and ``$set``)
418+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
419+
414420
.. include:: /includes/fact-update-example-docs-intro.rst
415421

416422
.. include:: /includes/fact-update-example-docs.rst
@@ -509,9 +515,12 @@ Examples
509515
:doc:`/reference/operator/update`,
510516
:ref:`dot notation <document-dot-notation>`
511517

512-
.. tab:: Push Elements to Existing Array
518+
.. tab:: Arrays
513519
:tabid: push-elements-existing-array
514520

521+
Push Elements to Existing Array (``$push``)
522+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
523+
515524
.. include:: /includes/fact-update-example-docs-intro.rst
516525

517526
.. include:: /includes/fact-update-example-docs.rst
@@ -558,9 +567,12 @@ Examples
558567

559568
:update:`$push`
560569

561-
.. tab:: Remove Fields ($unset)
570+
.. tab:: Unset
562571
:tabid: remove-fields
563572

573+
Remove Fields (``$unset``)
574+
~~~~~~~~~~~~~~~~~~~~~~~~~~
575+
564576
.. include:: /includes/fact-update-example-docs-intro.rst
565577

566578
.. include:: /includes/fact-update-example-docs.rst
@@ -607,9 +619,12 @@ Examples
607619

608620
:update:`$unset`, :update:`$rename`, :doc:`/reference/operator/update`
609621

610-
.. tab:: Replace Entire Document
622+
.. tab:: Replace
611623
:tabid: replace-doc
612624

625+
Replace Entire Document (``$update``)
626+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
627+
613628
.. include:: /includes/fact-update-example-docs-intro.rst
614629

615630
.. include:: /includes/fact-update-example-docs.rst
@@ -681,9 +696,12 @@ Examples
681696
150,
682697
"baking,cooking")
683698

684-
.. tab:: Update Multiple Documents
699+
.. tab:: Multiple
685700
:tabid: update-multiple
686701

702+
Update Multiple Documents (``$update`` With ``multi``)
703+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
704+
687705
.. include:: /includes/fact-update-example-docs-intro.rst
688706

689707
.. include:: /includes/fact-update-example-docs.rst
@@ -786,11 +804,17 @@ include the full shard key in the ``filter``. For additional
786804
:method:`db.collection.update()` behavior on a sharded collection, see
787805
:ref:`update-sharded-collection`.
788806

807+
The following tabs showcase a variety of uses of the ``upsert`` modifier
808+
with :method:`~db.collection.update()`.
809+
789810
.. tabs::
790811

791-
.. tab:: Upsert with Replacement Document
812+
.. tab:: Replace
792813
:tabid: upsert-example
793814

815+
Upsert with Replacement Document
816+
````````````````````````````````
817+
794818
If no document matches the query criteria and the ``<update>``
795819
parameter is a replacement document (i.e., contains only field
796820
and value pairs), the update inserts a new document with the
@@ -857,9 +881,12 @@ include the full shard key in the ``filter``. For additional
857881
"tags" : [ "database" ]
858882
}
859883

860-
.. tab:: Upsert with Operator Expressions
884+
.. tab:: Set
861885
:tabid: upsert-op-expr
862886

887+
Upsert with Operator Expressions (``$set``)
888+
```````````````````````````````````````````
889+
863890
If no document matches the query criteria and the ``<update>``
864891
parameter is a document with :ref:`update operator expressions
865892
<update-operators>`, then the operation creates a base document
@@ -902,9 +929,12 @@ include the full shard key in the ``filter``. For additional
902929

903930
:update:`$setOnInsert`
904931

905-
.. tab:: Aggregation Pipeline using Upsert
932+
.. tab:: Aggregation
906933
:tabid: agg-pipeline-upsert
907934

935+
Upsert using an Aggregation Pipeline
936+
````````````````````````````````````
937+
908938
If the ``<update>`` parameter is an :ref:`aggregation pipeline
909939
<update-behavior-agg-pipeline>`, the update creates a base
910940
document from the equality clauses in the ``<query>``
@@ -959,11 +989,11 @@ include the full shard key in the ``filter``. For additional
959989
For additional examples of updates using
960990
aggregation pipelines, see :ref:`update-behavior-agg-pipeline`.
961991

962-
.. tab:: Combine Upsert and Multi Options
992+
.. tab:: Multiple
963993
:tabid: combine-upsert-multi
964994

965-
Combine Upsert and Multi Options (Match)
966-
````````````````````````````````````````
995+
Using ``upsert`` with ``multi`` (Match)
996+
```````````````````````````````````````
967997

968998
From the :binary:`~bin.mongo` shell, insert the following
969999
documents into a ``books`` collection:
@@ -1024,8 +1054,8 @@ include the full shard key in the ``filter``. For additional
10241054
"tags" : [ "literature", "translated" ]
10251055
}
10261056

1027-
Combine Upsert and Multi Options (No Match)
1028-
```````````````````````````````````````````
1057+
Using ``upsert`` with ``multi`` (No Match)
1058+
``````````````````````````````````````````
10291059

10301060
If the collection had *no* matching document, the operation
10311061
would result in the insertion of a single document using the
@@ -1055,9 +1085,12 @@ include the full shard key in the ``filter``. For additional
10551085
"tags" : [ "literature", "hardcover" ]
10561086
}
10571087

1058-
.. tab:: Upsert with Dotted _id Query
1088+
.. tab:: Dotted ``_id``
10591089
:tabid: upsert-dotted-id
10601090

1091+
Upsert with Dotted ``_id`` Query
1092+
````````````````````````````````
1093+
10611094
.. include:: /includes/fact-upsert-id.rst
10621095

10631096
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)