You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/10_About_workshop/1_intro.mdx
+15Lines changed: 15 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,6 +26,21 @@ the aggregation pipeline.
26
26
27
27

28
28
29
+
### Comments
30
+
31
+
In the QUERY pane, lines prefixed with `//` comment-out the line. This is a useful way to document your work, or to have some variations to play around with.
32
+
33
+
The DATA SOURCE pane also accepts the comment prefix.
34
+
35
+
### Error messages
36
+
37
+
Sometimes aren't related to the actual cause. Syntax errors can cause confusion in interpreting the pipeline, configuration, or data.
38
+
39
+
Step back with a leaner, cleaner working example and build back up carefully.
40
+
41
+
This is why a Playground is useful - mistakes andtypos happen. syntax is unforgiving.
42
+
Error messages are our friend, giving us an opportunity to fix and learn iteratively in a safe environment.
Here's a gentle first exercise to get you started with the playground.
6
+
You'll see an index configuration and an aggregation pipeline stage that
7
+
hasn't been introduced yet, but no worries -
8
+
we'll get there next. See if you can solve it with what you already know or expect.
9
+
10
+
1. Navigate to this Playground snapshot linked above.
11
+
2. Press "Run"
12
+
3. Notice the empty array `[]` of results
13
+
14
+
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.
Create a <Playgroundpid="new">new playground</Playground>.
4
+
5
+
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:
6
+
7
+
```
8
+
[
9
+
{
10
+
"_id": 1,
11
+
"title": "mY vErY fIrSt PlAyGrOuNd"
12
+
}
13
+
]
14
+
```
15
+
16
+
Now, in the upper left box, create an aggregation pipeline that uses `$search` as the first (and only, for now)
17
+
stage. Here's one that matches that document with the default configuration:
Copy file name to clipboardExpand all lines: docs/30_Index_configuration/1_index_config.mdx
+4-2Lines changed: 4 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ Documents are indexed in Lucene using a flexible configuration specification.
7
7
The type of a field determines how it can be indexed, and thus how it can be searched.
8
8
9
9
Most field types are supported, including all the basic types such as booleans, dates, numerics,
10
-
and strings, as well as ObjectID, UUID, GeoJSON. Null values are also supported implicitly.
10
+
and strings, as well as ObjectID, UUID, GeoJSON types. Null values are also supported implicitly.
11
11
12
12
## Mapping
13
13
@@ -18,7 +18,7 @@ both.
18
18
19
19
### Dynamic mapping
20
20
21
-
An index configuration defaults a fully dynamic mapping:
21
+
An index configuration defaults to a fully dynamic mapping:
22
22
23
23
```
24
24
{
@@ -70,6 +70,8 @@ Using that mapping, this document would only have the `in_stock` field indexed,
70
70
}
71
71
```
72
72
73
+
A field path/name can be mapped as an array of supported types. When the type of the document field matches an index mapping for that type, it will be indexed as appropriate for that particular type.
74
+
73
75
## Configuring an Atlas Search index
74
76
75
77
Outside of the Playground, you have several options to set up and configure a persistent
0 commit comments