Skip to content

Commit

Permalink
progress checkpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
erikhatcher committed Jan 13, 2025
1 parent e48ea24 commit 662b6b4
Show file tree
Hide file tree
Showing 12 changed files with 80 additions and 20 deletions.
14 changes: 11 additions & 3 deletions docs/01_Welcome.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# Welcome

Welcome to the Atlas Search Fundamentals Workshop! In this interactive session, you'll learn how to use the MongoDB Atlas Search Playground to create and test powerful search queries for an Airbnb-like dataset, all without the need for setting up your own cluster.
# Welcome!

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.

Expand All @@ -25,3 +23,13 @@ This workshop presents the fundamental concepts of the full-text search capabili

5. **Data modeling and schema design for Atlas Search**
- Best practices

## TODO

Fill in any other blanks for welcoming and setting the stage for the workshop.

## The Exercises

This workshop uses the Atlas Search Playground for the exercises. All you need is a browser and network connectivity. This handy developer tool allows us to work in an isolated, focused environment
with no setup.

Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ There are two tools in the Playground:
* `Code Sandbox`: your data, an index configuration, an aggregation pipeline, and results
* `Search Demo Builder`: a configurable search UI on your data

The exercises will use the Code Sandbox, as it allows saving and sharing links to the full environment and allows us to work on one topic at a time.
The exercises will only use the Code Sandbox, as it allows saving and sharing links to the full environment and allows us to work on one topic at a time. We'll cover the Search Demo Builder briefly near the end of thw workshop.

## Code Sandbox layout

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@ we'll get there next. See if you can solve it with what you already know or expe

1. Navigate to this Playground snapshot:
https://search-playground.mongodb.com/tools/code-sandbox/snapshots/6782aea0667feaaf06324b87
2. Press "Run" (TODO: bring in the Run graphic)
2. Press "Run"
3. Notice the empty `[]` results

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.

TODO: insert un-fixed playground screenshot
![Playground intro exercise](/img/playground_intro_exercise.png)

![Run button](/img/playground_run.png)

<details>
<summary>Here's a solution...</summary>
Expand Down
10 changes: 10 additions & 0 deletions docs/15_Overview/1_system.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
# 📘 Atlas Search architecture

Atlas Search provides powerful findability capabilities to your data collections. A flexible index configuration allows mapping and indexing only the fields needed, or dynamically mapping any and all fields supported.

![big picture](/img/big_picture.png)


![system diagram](/img/system_diagram.png)

Changes to a collection via updates, deletes, or additions are *eventually consistent*, meaning the
index is updated independently of changes to the collection in a separate process, asynchronously. The lag between a change made to the database and refelected in a subsequent search is dependent on many factors such as deployment tier and architecture, the complexity of the index mapping, the other changes that are also queued, and the laws of physics.

The Atlas Search process can be deployed either coupled alongside the database nodes, or on separate dedicated nodes. Dedicated nodes provide separation of concerns, alleviating resource contention. Dedicated search nodes are recommended for production workloads.

## Coupled nodes
![coupled nodes](/img/coupled.png)

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,27 +1,54 @@
# Field types
# 👐 Field types

## boolean
equals: https://search-playground.mongodb.com/tools/code-playground/snapshots/669e6ab1d49ef6fad98118b4
Document fields are mapped to a search index based on their BSON data type.

## date
range: https://search-playground.mongodb.com/tools/code-playground/snapshots/669e6b18d49ef6fad98118b6
When `dynamic: "true"`, a field is indexed if its field type is supported.

## number
range: https://search-playground.mongodb.com/tools/code-playground/snapshots/669e6b4ad49ef6fad98118b8
When a field name is explicitly/statically mapped, it will be indexed if the field type also matches the
mapped type.

## geo
geoWithin: https://search-playground.mongodb.com/tools/code-playground/snapshots/669e6b762ce7658e786edbfa
Requires explicit geo type mapping, since dynamic mappings don’t support geo.
**TODO**: Turn each of these playgrounds into a challenge

## autocomplete
## Basic field types

### boolean
* `equals`: https://search-playground.mongodb.com/tools/code-playground/snapshots/669e6ab1d49ef6fad98118b4
* `in`: ...

### date
* `equals`: ...
* `in`: ...
* `near`: ...
* `range`: https://search-playground.mongodb.com/tools/code-playground/snapshots/669e6b18d49ef6fad98118b6

### number
* `equals`:
* `in`: ...
* `near`: ...
* `range`: https://search-playground.mongodb.com/tools/code-playground/snapshots/669e6b4ad49ef6fad98118b8

### ObjectId
* `equals`: https://search-playground.mongodb.com/tools/code-sandbox/snapshots/678506c2b6487c1cfd0bb540
* `in`:

### geo
Dynamic mapping does not support geo-spatial fields, and require a manual/static mapping configuration.

* `geoWithin`: https://search-playground.mongodb.com/tools/code-playground/snapshots/669e6b762ce7658e786edbfa
* `geoShape`:
* `near`:

## Other field types

### autocomplete
blah, don’t do it! ;)
See also: Relevant As-You-Type Suggestions Search Solution

## document
### document

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

## embeddedDocument
### embeddedDocument
Attribute pattern k/v matching, more nuanced than document type flattening
See cool tricks for embedded documents

Expand Down
1 change: 1 addition & 0 deletions docs/17_Index_configuration/4_string.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# 📘 String fields
8 changes: 8 additions & 0 deletions docs/17_Index_configuration/_category.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"label": "XXXX",
"position": 4,
"link": {
"type": "generated-index",
"description": "In this section, you'll install all required software."
}
}
6 changes: 5 additions & 1 deletion docs/90_Summary.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@

Congratulations!

## Additional topics
## Search Demo Builder

Do a demonstration of this tool, discussing it's sweet spot

## Search topics not covered here

* Faceting
* Highlighting
Expand Down
Binary file added static/img/big_picture.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/playground_intro_exercise.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/playground_run.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 662b6b4

Please sign in to comment.