Skip to content

Commit ad9b8c2

Browse files
committed
Technical Feedback
1 parent a2c3aa2 commit ad9b8c2

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

source/connect/connection-targets.txt

+7-7
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,8 @@ perform automatic discovery to find the others. To instruct the driver to perfor
8787
automatic discovery, perform one of the following actions:
8888

8989
- Specify the name of the replica set as the value of the ``replicaSet`` parameter.
90-
- Specify ``false`` as the value of the ``directConnection`` parameter.
90+
- Specify ``false`` as the value of the ``directConnection`` parameter. You can also omit
91+
this parameter, as it defaults to ``false``.
9192
- Specify more than one host in the replica set.
9293

9394
In the following example, the driver uses a sample connection URI to connect to the
@@ -114,13 +115,12 @@ balances operations across multiple MongoDB deployments, see the
114115
of its ``nodes`` attribute, the list might be empty while the client connects to
115116
the replica set members.
116117

117-
Initialization
118-
~~~~~~~~~~~~~~
118+
Connect to a Single Server
119+
~~~~~~~~~~~~~~~~~~~~~~~~~~
119120

120-
To initialize a replica set, you must connect directly to a single member. To do so,
121-
set the ``directConnection`` connection
122-
option to ``true``. You can do this in two ways: by passing an argument to the
123-
``MongoClient`` constructor or through a parameter in your connection string. Select the
121+
To connect to a single server in a replica set rather than the entire replica set, specify
122+
``false`` as the value of the ``directConnection`` connection option. You can do this in two ways: by passing
123+
an argument to the ``MongoClient`` constructor or through a parameter in your connection string. Select the
124124
:guilabel:`MongoClientSettings` or :guilabel:`Connection String` tab to see the corresponding code.
125125

126126
.. tabs::

0 commit comments

Comments
 (0)