← Lessons

quiz vs the machine

Platinum1800

Databases

The Atlas Search

Full text search built into the document database.

6 min read · advanced · beat Platinum to climb

Search Inside the Database

Plain field queries match exact values and ranges, but they handle human language poorly. Atlas Search embeds a full text inverted index alongside your collections so you can run relevance ranked text search without a separate search system.

What It Adds

  • Analyzers break text into tokens, lowercasing and stemming so a search for running finds run.
  • A relevance score ranks results by how well they match, not just whether they match.
  • Fuzzy matching tolerates typos, and phrase and wildcard queries refine intent.
  • Autocomplete supports type ahead experiences.

How It Fits

Atlas Search is driven through a search stage at the front of an aggregation pipeline, so you can combine relevance search with the usual filtering, grouping, and joining stages.

Because the search index lives next to the data and updates from the same changes, you avoid the consistency drift of syncing to an external engine. You define which fields are indexed and which analyzers apply.

Key idea

Atlas Search adds an analyzed inverted index next to your collection for relevance ranked, typo tolerant full text search, driven from a search stage in the aggregation pipeline.

Check yourself

Answer to earn rating on the learn ladder.

1. What does an analyzer do in Atlas Search?

2. Why keep the search index next to the data?