Skip to content

Commit c02df81

Browse files
Manually backport the change for MongoDB connector UUID known issue (#130229) (#130322)
* Manually backport the change * Update docs/reference/connector/docs/connectors-mongodb.asciidoc --------- Co-authored-by: Liam Thompson <[email protected]>
1 parent 60ad380 commit c02df81

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

docs/reference/connector/docs/connectors-mongodb.asciidoc

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,23 @@ The full host in this example will look like this:
201201
202202
`mongodb+srv://my.mongo.host.com/?tls=true&tlsAllowInvalidCertificates=true`
203203
204+
[discrete#es-connectors-mongodb-known-issues-uuids-incorrectly-deserialized]
205+
====== UUIDs are not correctly deserialized, causing problems with ingesting documents into Elasticsearch
206+
207+
MongoDB has special handling of UUID type: there is a legacy and a modern approach. You can read [official docs](https://pymongo.readthedocs.io/en/stable/examples/uuid.html) about the details.
208+
209+
With connector framework version 8.18.3, we improved how standard UUIDs are handled. Now, the MongoDB connector can correctly deserialize UUIDs into valid Elasticsearch values. However, for legacy UUIDs or older connector versions, you might need to adjust the connection string to specify the UUID representation.
210+
211+
For example, if you are using the modern UUID representation, adding the `uuidRepresentation=standard` query parameter to the MongoDB connection URI in the `host` Rich Configurable Field will allow the connector to properly handle UUIDs. With this change, the full `host` Rich Configurable Field value could look like this:`mongodb+srv://my_username:[email protected]/mydb?w=majority&uuidRepresentation=standard`
212+
213+
If you’re using a legacy UUID representation, you should adjust the connection URI accordingly. For example:
214+
215+
- C#: `uuidRepresentation=csharpLegacy`
216+
- Java: `uuidRepresentation=javaLegacy`
217+
- Python: `uuidRepresentation=pythonLegacy`
218+
219+
You can find full explanation in the [official docs](https://pymongo.readthedocs.io/en/stable/examples/uuid.html#configuring-a-uuid-representation).
220+
204221
See <<es-connectors-known-issues>> for any issues affecting all connectors.
205222
206223
[discrete#es-connectors-mongodb-troubleshooting]
@@ -589,6 +606,23 @@ The command line will output the error `cannot import name 'coroutine' from 'asy
589606
** This issue is fixed in versions *8.12.2* and *8.13.0*.
590607
** This bug does not affect Elastic managed connectors.
591608
609+
[discrete#es-connectors-mongodb-client-known-issues-uuids-incorrectly-deserialized]
610+
====== UUIDs are not correctly deserialized, causing problems with ingesting documents into Elasticsearch
611+
612+
MongoDB has special handling of UUID type: there is a legacy and a modern approach. You can read [official docs](https://pymongo.readthedocs.io/en/stable/examples/uuid.html) about the details.
613+
614+
With connector framework version , we improved how standard UUIDs are handled. Now, the MongoDB connector can correctly deserialize UUIDs into valid Elasticsearch values. However, for legacy UUIDs or older connector versions, you might need to adjust the connection string to specify the UUID representation.
615+
616+
For example, if you are using the modern UUID representation, adding the `uuidRepresentation=standard` query parameter to the MongoDB connection URI in the `host` Rich Configurable Field will allow the connector to properly handle UUIDs. With this change, the full `host` Rich Configurable Field value could look like this:`mongodb+srv://my_username:[email protected]/mydb?w=majority&uuidRepresentation=standard`
617+
618+
If you’re using a legacy UUID representation, you should adjust the connection URI accordingly. For example:
619+
620+
- C#: `uuidRepresentation=csharpLegacy`
621+
- Java: `uuidRepresentation=javaLegacy`
622+
- Python: `uuidRepresentation=pythonLegacy`
623+
624+
You can find full explanation in the [official docs](https://pymongo.readthedocs.io/en/stable/examples/uuid.html#configuring-a-uuid-representation).
625+
592626
See <<es-connectors-known-issues>> for any issues affecting all connectors.
593627
594628
[discrete#es-connectors-mongodb-client-troubleshooting]

0 commit comments

Comments
 (0)