Skip to content

Commit d8965b3

Browse files
committed
Making the exercise links and instructions clearer
1 parent 8e7993f commit d8965b3

File tree

7 files changed

+120
-66
lines changed

7 files changed

+120
-66
lines changed

docs/10_About_workshop/1_intro.mdx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,7 @@ There are two tools in the Playground:
1313
* `Search Demo Builder`: a configurable search UI on your data
1414

1515
The exercises will only use the Code Sandbox, as it allows saving and sharing links to
16-
the full environment and allows us to work on one topic at a time.
17-
18-
We'll cover the Search Demo Builder briefly near the end of the workshop.
16+
the full environment. Note that there are several templates in the Code Sandbox with more elaborate example data, configurations, and queries than the exercises in this workshop; we use simpler playgrounds here so that we can focus on one aspect at time.
1917

2018
## Code Sandbox layout
2119

@@ -38,11 +36,11 @@ The DATA SOURCE pane also accepts the comment prefix.
3836

3937
### Error messages
4038

41-
Sometimes aren't related to the actual cause. Syntax errors can cause confusion in interpreting the pipeline, configuration, or data.
39+
Sometimes error messages aren't related to the actual cause. Syntax errors can cause confusion in interpreting the pipeline, configuration, or data.
4240

4341
Step back with a leaner, cleaner working example and build back up carefully.
4442

45-
This is why a Playground is useful - mistakes andtypos happen. syntax is unforgiving.
43+
This is why a Playground is useful - mistakes and typos happen. The syntax is unforgiving.
4644
Error messages are our friend, giving us an opportunity to fix and learn iteratively in a safe environment.
4745

4846
## Resources

docs/10_About_workshop/8_Exercises/1_.mdx

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,25 @@
1-
# Exercise: Fix me
1+
# Intro group exercise
22

33
Here's a gentle first exercise to get us started with the playground.
4-
You'll see an index configuration and an aggregation pipeline stage that
5-
hasn't been introduced yet, but no worries -
6-
we'll get there next. See if you can solve it with what you already know or expect.
74

85
We're going to work through this one together as a group.
96

10-
1. Navigate to the Playground snapshot linked below.
7+
1. Navigate to the `🔗 Playground link`.
118
2. Press "Run"
129
3. Notice the empty array `[]` of results
1310

11+
All exercises in this workshop will be in this format, with a `🔗 Playground link`, followed
12+
13+
## 🤔 Exercise: Fix me
14+
15+
<Playground url="https://search-playground.corp.mongodb.com/tools/code-sandbox/snapshots/6782aea0667feaaf06324b87">🔗 Playground link: Exercise: Fix me</Playground>
16+
17+
You'll see an index configuration and an aggregation pipeline stage that
18+
hasn't been introduced yet, but no worries - we'll get there next. See if you can solve it with
19+
what you already know or expect.
20+
1421
The objective with this exercise is to adjust the `FIX_ME` in the `$search` aggregation pipeline stage so that the document (in the Data Source pane) matches the query and appears in the Results pane.
1522

16-
* <Playground url="https://search-playground.corp.mongodb.com/tools/code-sandbox/snapshots/6782aea0667feaaf06324b87">Playground: Fix me</Playground>
1723

1824
[![Playground intro exercise](/img/playground_intro_exercise.png)](/img/playground_intro_exercise.png)
1925

@@ -38,7 +44,7 @@ The objective with this exercise is to adjust the `FIX_ME` in the `$search` aggr
3844
</details>
3945

4046
<details>
41-
<summary>There are other possible solutions too, such as:</summary>
47+
<summary>There are other possible solutions too, such as...</summary>
4248
<div>
4349
`atlas` or `fundamentals` or other case variations of any `title` field words
4450
</div>

docs/10_About_workshop/8_Exercises/2_.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# Exercise: My very first playground
1+
# Your own playground
22

3-
Create a <Playground url="https://search-playground.mongodb.com/tools/code-sandbox/snapshots/new">new playground</Playground>.
3+
Create a <Playground url="https://search-playground.mongodb.com/tools/code-sandbox/snapshots/new">🔗 Playground link: new playground</Playground>.
44

55
Clear the data box in the lower left (select-all, delete), and then type, paste, or import an array of a few documents. You could copy/paste the below, for example:
66

Lines changed: 73 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,94 +1,134 @@
11
# Exercises: Basic types
22

3-
## boolean
3+
These exercises demonstrate how Atlas Search handles the basic data types of boolean, date, number, and ObjectId. Each exercise isolates a specific data type and search operator.
4+
5+
## boolean: equals
6+
7+
<Playground url="https://search-playground.corp.mongodb.com/tools/code-sandbox/snapshots/679c1d80e97570c2714a07e0">🔗 Playground link: `equals`</Playground>
8+
9+
The documents contain a boolean field, and the query is looking for documents with a value of `true`.
10+
Fix the incorrect field name in the query.
411

5-
<Playground url="https://search-playground.corp.mongodb.com/tools/code-sandbox/snapshots/679c1d80e97570c2714a07e0">`equals`</Playground>
612
<details>
713
<summary>Solution</summary>
814
<div>
915
```js
1016
path: "in_stock"
1117
```
1218

13-
<Playground url="https://search-playground.mongodb.com/tools/code-playground/snapshots/669e6ab1d49ef6fad98118b4">boolean `equals` fixed</Playground>
19+
🔗 <Playground url="https://search-playground.mongodb.com/tools/code-playground/snapshots/669e6ab1d49ef6fad98118b4">boolean `equals` fixed</Playground>
1420
</div>
1521
</details>
1622

1723

18-
<Playground url="https://search-playground.corp.mongodb.com/tools/code-sandbox/snapshots/679c1e53d0df60f0254e5d2b">`in`</Playground>
24+
## boolean: in
25+
26+
<Playground url="https://search-playground.corp.mongodb.com/tools/code-sandbox/snapshots/679c1e53d0df60f0254e5d2b">🔗 Playground link: `in`</Playground>
27+
28+
What values are allowed in an `in` clause for a `boolean` field?
29+
1930
<details>
2031
<summary>Solution</summary>
2132
<div>
2233
```js
2334
value: [true, false]
2435
```
2536

26-
<Playground url="https://search-playground.corp.mongodb.com/tools/code-sandbox/snapshots/679c19c4e97570c2714a07dc">boolean `in` fixed</Playground>
37+
🔗 <Playground url="https://search-playground.corp.mongodb.com/tools/code-sandbox/snapshots/679c19c4e97570c2714a07dc">boolean `in` fixed</Playground>
2738
</div>
2839
</details>
2940

3041

31-
## date
32-
<Playground url="https://search-playground.corp.mongodb.com/tools/code-sandbox/snapshots/679c1b0fe97570c2714a07de">`equals`</Playground>
42+
## date: equals
43+
44+
<Playground url="https://search-playground.corp.mongodb.com/tools/code-sandbox/snapshots/679c1b0fe97570c2714a07de">🔗 Playground link: `equals`</Playground>
45+
46+
Dates require BSON syntax.
47+
3348
<details>
3449
<summary>Solution</summary>
3550
<div>
3651
```js
3752
value: ISODate("2023-11-01T00:00:00.000Z")
3853
```
3954

40-
<Playground url="https://search-playground.corp.mongodb.com/tools/code-sandbox/snapshots/679c20a4d0df60f0254e5d2d">date `equals` fixed</Playground>
55+
🔗 <Playground url="https://search-playground.corp.mongodb.com/tools/code-sandbox/snapshots/679c20a4d0df60f0254e5d2d">date `equals` fixed</Playground>
4156
</div>
4257
</details>
4358

44-
<Playground url="https://search-playground.corp.mongodb.com/tools/code-sandbox/snapshots/679c1b5fd0df60f0254e5d27">`in`</Playground>
59+
## date: in
60+
61+
<Playground url="https://search-playground.corp.mongodb.com/tools/code-sandbox/snapshots/679c1b5fd0df60f0254e5d27">🔗 Playground link: `in`</Playground>
62+
63+
BSON date syntax is needed.
64+
4565
<details>
4666
<summary>Solution</summary>
4767
<div>
4868
```js
4969
value: [ISODate("2024-02-01T00:00:00.000Z"), ISODate("2023-11-01T00:00:00.000Z"), ISODate("2007-12-25T00:00:00.000Z")]
5070
```
5171

52-
<Playground url="https://search-playground.corp.mongodb.com/tools/code-sandbox/snapshots/679c210ee97570c2714a07e2">date `in` fixed</Playground>
72+
🔗 <Playground url="https://search-playground.corp.mongodb.com/tools/code-sandbox/snapshots/679c210ee97570c2714a07e2">date `in` fixed</Playground>
5373
</div>
5474
</details>
5575

56-
<Playground url="https://search-playground.corp.mongodb.com/tools/code-sandbox/snapshots/679c21c8d0df60f0254e5d2f">`range`</Playground>
76+
## date: range
77+
78+
<Playground url="https://search-playground.corp.mongodb.com/tools/code-sandbox/snapshots/679c21c8d0df60f0254e5d2f">🔗 Playground link: `range`</Playground>
79+
80+
What's the correct field name?
81+
5782
<details>
5883
<summary>Solution</summary>
5984
<div>
6085
```js
6186
path: "published_date"
6287
```
63-
<Playground url="https://search-playground.mongodb.com/tools/code-playground/snapshots/669e6b18d49ef6fad98118b6">date `range` fixed</Playground>
88+
🔗 <Playground url="https://search-playground.mongodb.com/tools/code-playground/snapshots/669e6b18d49ef6fad98118b6">date `range` fixed</Playground>
6489
</div>
6590
</details>
6691

6792

68-
## number
69-
<Playground url="https://search-playground.corp.mongodb.com/tools/code-sandbox/snapshots/679c25abd0df60f0254e5d35">`equals`</Playground>
93+
## number: equals
94+
95+
<Playground url="https://search-playground.corp.mongodb.com/tools/code-sandbox/snapshots/679c25abd0df60f0254e5d35">🔗 Playground link: `equals`</Playground>
96+
97+
What's the correct field name?
98+
7099
<details>
71100
<summary>Solution</summary>
72101
<div>
73102
```js
74103
path: "price"
75104
```
76-
<Playground url="https://search-playground.corp.mongodb.com/tools/code-sandbox/snapshots/679c25e2d0df60f0254e5d37">number `equals` fixed</Playground>
105+
🔗 <Playground url="https://search-playground.corp.mongodb.com/tools/code-sandbox/snapshots/679c25e2d0df60f0254e5d37">number `equals` fixed</Playground>
77106
</div>
78107
</details>
79108

80-
<Playground url="https://search-playground.corp.mongodb.com/tools/code-sandbox/snapshots/679c252ce97570c2714a07e6">`in`</Playground>
109+
## number: in
110+
111+
<Playground url="https://search-playground.corp.mongodb.com/tools/code-sandbox/snapshots/679c252ce97570c2714a07e6">🔗 Playground link: `in`</Playground>
112+
113+
What numeric value can be used to match one of the documents?
114+
81115
<details>
82116
<summary>Solution</summary>
83117
<div>
84118
```js
85119
value: [19.99, 37.5]
86120
```
87-
<Playground url="https://search-playground.corp.mongodb.com/tools/code-sandbox/snapshots/679c2569d0df60f0254e5d33">number `in` fixed</Playground>
121+
🔗 <Playground url="https://search-playground.corp.mongodb.com/tools/code-sandbox/snapshots/679c2569d0df60f0254e5d33">number `in` fixed</Playground>
88122
</div>
89123
</details>
90124

91-
<Playground url="https://search-playground.corp.mongodb.com/tools/code-sandbox/snapshots/679c2313d0df60f0254e5d31">`range`</Playground> (fix two issues, not just one!)
125+
## number: range
126+
127+
<Playground url="https://search-playground.corp.mongodb.com/tools/code-sandbox/snapshots/679c2313d0df60f0254e5d31">🔗 Playground link: `range`</Playground>
128+
129+
There are *two* issues to fix in this exercises. What's the correct field name? And what's wrong with
130+
the one of the range values?
131+
92132
<details>
93133
<summary>Solution</summary>
94134
<div>
@@ -99,29 +139,38 @@
99139
lte: 25.00
100140
}
101141
```
102-
<Playground url="https://search-playground.corp.mongodb.com/tools/code-sandbox/snapshots/679c22bde97570c2714a07e4">number `range` fixed</Playground>
142+
🔗 <Playground url="https://search-playground.corp.mongodb.com/tools/code-sandbox/snapshots/679c22bde97570c2714a07e4">number `range` fixed</Playground>
103143
</div>
104144
</details>
105145

106-
## ObjectId
107-
<Playground url="https://search-playground.corp.mongodb.com/tools/code-sandbox/snapshots/679c265dd0df60f0254e5d39">`equals`</Playground>
146+
## ObjectId: equals
147+
148+
<Playground url="https://search-playground.corp.mongodb.com/tools/code-sandbox/snapshots/679c265dd0df60f0254e5d39">🔗 Playground link: `equals`</Playground>
149+
150+
ObjectId requires BSON syntax. Copy and paste is your friend here.
151+
108152
<details>
109153
<summary>Solution</summary>
110154
<div>
111155
```js
112156
value: ObjectId("5a9427648b0beebeb69589a1")
113157
```
114-
<Playground url="https://search-playground.corp.mongodb.com/tools/code-sandbox/snapshots/67962d77aa132ffc76719f53">ObjectId `equals` fixed</Playground>
158+
🔗 <Playground url="https://search-playground.corp.mongodb.com/tools/code-sandbox/snapshots/67962d77aa132ffc76719f53">ObjectId `equals` fixed</Playground>
115159
</div>
116160
</details>
117161

118-
<Playground url="https://search-playground.corp.mongodb.com/tools/code-sandbox/snapshots/679c26d5d0df60f0254e5d3b">`in`</Playground>
162+
## ObjectId: in
163+
164+
<Playground url="https://search-playground.corp.mongodb.com/tools/code-sandbox/snapshots/679c26d5d0df60f0254e5d3b">🔗 Playground link: `in`</Playground>
165+
166+
What value can be placed in the `in` array to match the document?
167+
119168
<details>
120169
<summary>Solution</summary>
121170
<div>
122171
```js
123172
value: [ObjectId("ba94c7648b0beebeb69589a1"), ObjectId("5a9427648b0beebeb69589a1")]
124173
```
125-
<Playground url="https://search-playground.corp.mongodb.com/tools/code-sandbox/snapshots/679c270cd0df60f0254e5d3d">ObjectId `in` fixed</Playground>
174+
🔗 <Playground url="https://search-playground.corp.mongodb.com/tools/code-sandbox/snapshots/679c270cd0df60f0254e5d3d">ObjectId `in` fixed</Playground>
126175
</div>
127176
</details>

docs/30_Index_configuration/8_Exercises/2_.mdx

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
# Exercises: Type mismatches
22

3-
Atlas Search is quite type sensitive. The BSON type of each field is used to determine which index mapping type to use. And at query time, the search operator type of `value` is used to determine which index to query for a particular field/path name.
3+
Atlas Search is quite type sensitive. The BSON type of each field is used to determine which index mapping type to use. And at query time, the search operator type of the `value` is used to determine which indexed type to query for a particular field/path name.
44

55
## boolean
6+
7+
<Playground url="https://search-playground.corp.mongodb.com/tools/code-sandbox/snapshots/67962dfdaa132ffc76719f57">🔗 Playground link: boolean type mismatch</Playground>
8+
69
Why doesn't this playground match as expected?
710

8-
<Playground url="https://search-playground.corp.mongodb.com/tools/code-sandbox/snapshots/67962dfdaa132ffc76719f57">boolean type mismatch</Playground>
9-
1011
<details>
1112
<summary>Explanation</summary>
1213
<div>
@@ -30,7 +31,10 @@ Here's a corrected pipeline:
3031
</details>
3132

3233
## number
33-
<Playground url="https://search-playground.corp.mongodb.com/tools/code-sandbox/snapshots/67962e2faa132ffc76719f5b">number type mismatch</Playground>
34+
<Playground url="https://search-playground.corp.mongodb.com/tools/code-sandbox/snapshots/67962e2faa132ffc76719f5b">🔗 Playground link: number type mismatch</Playground>
35+
36+
Why won't the query match?
37+
3438
<details>
3539
<summary>Solution</summary>
3640
<div>
@@ -44,7 +48,10 @@ Here's a corrected pipeline:
4448

4549

4650
## ObjectID
47-
<Playground url="https://search-playground.corp.mongodb.com/tools/code-sandbox/snapshots/67962dc7aa132ffc76719f55">ObjectId type mismatch</Playground>
51+
<Playground url="https://search-playground.corp.mongodb.com/tools/code-sandbox/snapshots/67962dc7aa132ffc76719f55">🔗 Playground link: ObjectId type mismatch</Playground>
52+
53+
The ObjectId value is correct, but the document does not match. Can you spot, and fix, the issue?
54+
4855
<details>
4956
<summary>Solution</summary>
5057
<div>

docs/30_Index_configuration/8_Exercises/3_.mdx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@ Refer back to the `string` section above for details on configuring the `token`
44

55
## `equals` on strings
66

7-
<Playground url="https://search-playground.corp.mongodb.com/tools/code-sandbox/snapshots/679c2fedd0df60f0254e5d3f">`equals` on `string` mismatch</Playground>
7+
🔗 Playground link: <Playground url="https://search-playground.corp.mongodb.com/tools/code-sandbox/snapshots/679c2fedd0df60f0254e5d3f">`equals` on `string` mismatch</Playground>
8+
9+
The category field is a string. Try using the `string` field type - why doesn't it work? What's the right type to use in order to use the `equals` operator?
10+
811
<details>
912
<summary>Solution</summary>
1013
<div>
@@ -24,7 +27,7 @@ Refer back to the `string` section above for details on configuring the `token`
2427
}
2528
}
2629
```
27-
<Playground url="https://search-playground.corp.mongodb.com/tools/code-sandbox/snapshots/679c3028d0df60f0254e5d41">token type `equals` fixed</Playground>
30+
🔗 <Playground url="https://search-playground.corp.mongodb.com/tools/code-sandbox/snapshots/679c3028d0df60f0254e5d41">token type `equals` fixed</Playground>
2831
</div>
2932
</details>
3033

docs/welcome.mdx

Lines changed: 12 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -6,40 +6,31 @@ sidebar_position: 1
66

77
This workshop presents the fundamental concepts of the full-text search capabilities provided by Atlas Search, and empowers developers with best practice techniques to bring powerful search experiences to their applications. Developers will engage with a number of practical exercises to gain experience and confidence in understanding textual analysis and tokenization, configuring field types, and leveraging search operators for better relevancy.
88

9-
## What You'll Learn
9+
## What you'll Learn
1010

1111
1. **Atlas Search overview**
12-
- System architecture
13-
- Index configuration
14-
- Inverted index
12+
- System architecture
13+
- Index configuration
14+
- Inverted index
1515

1616
2. **Analysis**
17-
- Built-in analyzers
18-
- Multi analysis
17+
- Built-in analyzers
18+
- Multi analysis
1919

2020
3. **Search operators**
21-
- Text operators
22-
- Query construction
21+
- Text operators
22+
- Query construction
2323

2424
4. **Relevancy**
25-
- Scoring
26-
- TF/IDF and BM25
25+
- Scoring
26+
- TF/IDF and BM25
2727

2828
5. **Data modeling and schema design for Atlas Search**
29-
- Best practices
29+
- Best practices
3030

31-
## TODO
32-
33-
Fill in any other blanks for welcoming and setting the stage for the workshop.
34-
35-
## The Exercises
31+
## What you'll need
3632

3733
This workshop uses the Atlas Search Playground for the exercises.
3834
All you need is a browser and network connectivity.
3935
This handy developer tool allows us to work in an isolated, focused environment
4036
with no setup.
41-
42-
43-
🙋🏾‍♀️
44-
45-
📣

0 commit comments

Comments
 (0)