File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -51,12 +51,20 @@ Definition
51
51
Examples
52
52
--------
53
53
54
- To set a read preference mode in the :binary:`~bin.mongo` shell, use the
55
- following operation:
54
+
55
+ Specify Read Preference Mode
56
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
57
+
58
+ The following operation in the :binary:`~bin.mongo` shell sets the read
59
+ preference :ref:`mode <mongo-setReadPref-mode>` to allow reads from
60
+ secondary members and target the read to a secondary member.
56
61
57
62
.. code-block:: javascript
58
63
59
- db.getMongo().setReadPref('primaryPreferred')
64
+ db.getMongo().setReadPref('secondary')
65
+
66
+ Specify Read Preference Tag Set
67
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
60
68
61
69
To set a read preference that uses a tag set, specify an array of tag
62
70
sets as the second argument to :method:`Mongo.setReadPref()`, as in the
You can’t perform that action at this time.
0 commit comments