From c76ea7b0378eed37dfe7bd67fb9e911068edec5f Mon Sep 17 00:00:00 2001 From: johnnyshields Date: Thu, 13 Apr 2023 15:22:27 +0900 Subject: [PATCH 1/5] As per DOCS-15993, the limitation of dot in shard keys comes from MongoDB server, not from Mongoid. --- docs/reference/sharding.txt | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/docs/reference/sharding.txt b/docs/reference/sharding.txt index ab451bf4af..09dd1f15c3 100644 --- a/docs/reference/sharding.txt +++ b/docs/reference/sharding.txt @@ -84,7 +84,7 @@ configured in the association as the field name: end The shard key may also reference a field in an embedded document, by using -the "." character to delimit the field names: +the ``.`` (dot) character to delimit the field names: .. code-block:: ruby @@ -94,9 +94,8 @@ the "." character to delimit the field names: .. note:: - Because the "." character is used to delimit fields in embedded documents, - Mongoid does not currently support shard key fields that themselves - literally contain the "." character. + MongoDB `does not currently support `_ + shard key fields that themselves literally contain the ``.`` character. .. note:: From 24da855f86661729406928742a0b63cf79c38ff9 Mon Sep 17 00:00:00 2001 From: Johnny Shields Date: Thu, 13 Apr 2023 15:27:16 +0900 Subject: [PATCH 2/5] Update sharding.txt --- docs/reference/sharding.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/reference/sharding.txt b/docs/reference/sharding.txt index 09dd1f15c3..5fb3cfd914 100644 --- a/docs/reference/sharding.txt +++ b/docs/reference/sharding.txt @@ -94,8 +94,9 @@ the ``.`` (dot) character to delimit the field names: .. note:: + As the ``.`` character in shard keys is reserved for referencing embedded document fields, MongoDB `does not currently support `_ - shard key fields that themselves literally contain the ``.`` character. + using fields whose names literally contain the ``.`` character as shard keys. .. note:: From 7c3366242b3fabcb044488ed32080fd79ddaa848 Mon Sep 17 00:00:00 2001 From: Johnny Shields Date: Thu, 13 Apr 2023 15:30:27 +0900 Subject: [PATCH 3/5] Update sharding.txt --- docs/reference/sharding.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/reference/sharding.txt b/docs/reference/sharding.txt index 5fb3cfd914..2f1ea085d0 100644 --- a/docs/reference/sharding.txt +++ b/docs/reference/sharding.txt @@ -94,7 +94,7 @@ the ``.`` (dot) character to delimit the field names: .. note:: - As the ``.`` character in shard keys is reserved for referencing embedded document fields, + Because the ``.`` character in shard keys is reserved for referencing embedded document fields, MongoDB `does not currently support `_ using fields whose names literally contain the ``.`` character as shard keys. From 6ba59a9aa8e69562eb9fc703b785d1ce4136636e Mon Sep 17 00:00:00 2001 From: Johnny Shields <27655+johnnyshields@users.noreply.github.com> Date: Mon, 15 Apr 2024 06:36:33 +0900 Subject: [PATCH 4/5] Update sharding.txt --- docs/reference/sharding.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/reference/sharding.txt b/docs/reference/sharding.txt index 2f1ea085d0..fee2cda689 100644 --- a/docs/reference/sharding.txt +++ b/docs/reference/sharding.txt @@ -96,7 +96,7 @@ the ``.`` (dot) character to delimit the field names: Because the ``.`` character in shard keys is reserved for referencing embedded document fields, MongoDB `does not currently support `_ - using fields whose names literally contain the ``.`` character as shard keys. + using fields whose names contain the ``.`` character as shard keys. .. note:: From 323d8520a5d8fefebffbccfed35a7f18f952dd4f Mon Sep 17 00:00:00 2001 From: Johnny Shields <27655+johnnyshields@users.noreply.github.com> Date: Tue, 6 May 2025 05:58:00 +0900 Subject: [PATCH 5/5] Update sharding.txt --- docs/reference/sharding.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/reference/sharding.txt b/docs/reference/sharding.txt index 957ba6ea36..1c71e763e1 100644 --- a/docs/reference/sharding.txt +++ b/docs/reference/sharding.txt @@ -95,7 +95,7 @@ the ``.`` (dot) character to delimit the field names: .. note:: Because the ``.`` character in shard keys is reserved for referencing embedded document fields, - MongoDB `does not currently support `_ + MongoDB `does not support `_ using fields whose names contain the ``.`` character as shard keys. .. note::