Skip to content

Commit 23c3cdb

Browse files
authored
DOCSP-26913: Added reference to upsertDocument option (#148)
* DOCSP-26913: Added reference to upsertDocument option * Added clarifications based on recommendations.
1 parent f1f3ded commit 23c3cdb

File tree

1 file changed

+15
-4
lines changed

1 file changed

+15
-4
lines changed

source/configuration/write.txt

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,13 @@ The following options for writing to MongoDB are available:
7272

7373
- ``insert``: insert the data.
7474
- ``replace``: replace an existing document that matches the
75-
``idFieldList`` value with the new data, or insert the data if
76-
no match exists.
75+
``idFieldList`` value with the new data. If no match exists, the
76+
value of ``upsertDocument`` indicates whether or not the connector
77+
inserts a new document.
7778
- ``update``: update an existing document that matches the
78-
``idFieldList`` value with the new data, or inserts the data if
79-
no match exists.
79+
``idFieldList`` value with the new data. If no match exists, the
80+
value of ``upsertDocument`` indicates whether or not the connector
81+
inserts a new document.
8082

8183
|
8284
| **Default:** ``replace``
@@ -130,6 +132,15 @@ The following options for writing to MongoDB are available:
130132
guide on the
131133
:manual:`WriteConcern wtimeout option </reference/write-concern/#wtimeout>`.
132134

135+
* - ``upsertDocument``
136+
- | When ``true``, replace and update operations will insert the data
137+
if no match exists.
138+
|
139+
| For time series collections, you must set ``upsertDocument`` to
140+
``false``.
141+
|
142+
| **Default:** ``true``
143+
133144
.. _configure-output-uri:
134145

135146
``connection.uri`` Configuration Setting

0 commit comments

Comments
 (0)