File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -614,7 +614,7 @@ field.
614614Set a Read Preference
615615~~~~~~~~~~~~~~~~~~~~~
616616
617- To specify which replica set members receive your read operation ,
617+ To specify which replica set members receive your read operations ,
618618set a read preference by using the ``readPreference()`` method.
619619
620620The ``readPreference()`` method accepts the following parameters:
@@ -634,7 +634,8 @@ The ``readPreference()`` method accepts the following parameters:
634634 in the MongoDB PHP extension documentation.
635635
636636The following example queries for documents in which the value of the ``title``
637- field is ``"Carrie"`` and retrieves the results from secondary replica set
637+ field is ``"Carrie"`` and sets the read preference to ``"secondaryPreferred"``.
638+ As a result, the query retrieves the results from secondary replica set
638639members or the primary member if no secondaries are available:
639640
640641.. tabs::
You can’t perform that action at this time.
0 commit comments