Skip to main content

πŸ“˜ Atlas Search Playground

I really like use of the Search playground. It’s fun to play with, makes me feel good that I can figure out the answer, and encourages me to tinker.

The Atlas Search Playground (or just Playground) is used for the exercises in this workshop. The Playground is a self-contained lightweight, yet feature-rich Atlas Search environment which does not require an Atlas account to use.

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 only use the Code Sandbox, as it allows saving and sharing links to 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.

Code Sandbox layout​

To begin, navigate to the Atlas Search Playground. In the next section, you'll work through the first exercise to get familiar with the Playground's Code Sandbox.

Run button​

After you make changes to any of the Playground areas, press the Run button to execute the aggregation pipeline.

Run button

Comments​

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.

The DATA SOURCE pane also accepts the comment prefix.

Error messages​

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

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

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

Resources​


Let's dive into the world of Atlas Search using this convenient and powerful playground environment!