Skip to content

Commit 88ccad4

Browse files
committed
nested doc update
1 parent 4f9aa19 commit 88ccad4

File tree

4 files changed

+14
-0
lines changed

4 files changed

+14
-0
lines changed

docs/30_Index_configuration/4_nested_docs.mdx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,21 @@ There are two distinct ways to map and index the contents of nested documents.
88

99
Default dynamic mapping behavior, flattens nested documents into “arrays” of values on main document.
1010

11+
![flattened document](/img/flattened_document.png)
12+
13+
1114
## `embeddedDocuments`
1215

1316
Attribute pattern `elemMatch`-like matching, more nuanced and expensive than document type flattening.
1417
See also: https://www.mongodb.com/docs/atlas/atlas-search/field-types/embedded-documents-type/
1518

1619
WARNING: Each nested document mapped as as `embeddedDocuments` counts as an additional "index object".
20+
21+
```
22+
"children": {
23+
"type": "embeddedDocuments",
24+
"dynamic": true
25+
}
26+
```
27+
28+
![embeddedDocuments](/img/embedded_documents.png)

docs/70_Data_Modeling/index.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
# Data Modeling for Search
22

3+
https://www.mongodb.com/developer/products/atlas/data-modeling-for-search/
4+
35
* Labs: movies search searching for movies, versus searching for cast members
46
* Tips: $merge

static/img/embedded_documents.png

118 KB
Loading

static/img/flattened_document.png

113 KB
Loading

0 commit comments

Comments
 (0)