Create a search index on your collections in a few clicks or a single API call. Test search queries and preview results in the Aggregation Pipeline Builder before deploying them in application code.
Atlas Search brings together the best of both worlds. It’s deeply integrated with the MongoDB aggregation framework and is built on top of Apache Lucene, the industry standard library for full-text search.
Full-text search uses a different structure for storing data that’s optimized for efficient search queries called an inverted index. Think of an inverted index as a glossary that lists all the unique values that appear in a document. Each value has a list of the documents in which it appears and the value’s position within that document.
Yes, Atlas Search is only available for MongoDB Atlas clusters running MongoDB 4.2 or higher.
Atlas Search supports multiple features, including:
If you have ideas or suggestions for other features, please submit them to our feedback portal.
Atlas Search currently supports text, dates, numerics, boolean, objectID, and geospatial data types.
Atlas Search currently supports over 40 languages using Lucene analyzers. You can see the full list in our documentation.
Atlas Search is available with all MongoDB Atlas clusters running MongoDB 4.2 or higher. It comes at no extra cost, although it will consume resources on your cluster.
Once you load data into an Atlas cluster, you can easily create search index definitions in the Atlas UI. You can also create, update, and delete indexes programmatically using the Atlas API.
Atlas Search queries are MongoDB aggregation pipelines that use $search as the first stage. The $search stage can be customized using different operators and options. To learn more, visit our documentation.
MongoDB offers native text search that supports basic queries on string content. However, text indexes only work for text-based content and the $text operator can be modified in limited ways.
In comparison, MongoDB Atlas Search offers:
Atlas Search can provide more ways to fine-tune the relevance of search results and support faster query results because it’s based on Apache Lucene, the open source search engine that powers Elasticsearch and Solr.
Atlas Search offers support for over 40 languages, multiple data types, autocomplete, fuzzy search, custom analyzers, custom scoring, highlighting, synonyms, and more.
Atlas Search has an active roadmap that will expand the features and use cases it can support. No additional work is planned to improve the native MongoDB text search, which was last updated in 2015 with MongoDB 3.2.
|MongoDB Atlas Search||MongoDB Text Search|
|Supported deployments||Atlas on AWS, Azure, GCP||All MongoDB deployments|
|Supported versions||4.2 or higher||3.2 or higher1|
|Consistency between base data and text index||Eventually consistent||Strongly consistent|
|Maximum numbers of indexes per collection||Multiple||One|
|Dynamic and static field mappings||Yes||No|
|Field path to be searched||Defined at search time||Defined at index creation time|
|Search query performance||Higher||Lower|
Integration with aggregation pipeline
Navigate, limit, skip, sort and filter results
|Fully integrated||Fully integrated|
Support for multiple data types
Text, numerics, dates, geoJSON, boolean, objectID
|Support for fuzzy search||Yes||No|
|Support for autocomplete||Yes||No|
|Support for highlighting||Yes||No|
Support for Lucene analyzers
Standard, Simple, Whitespace, Language, Keyword
Atlas Search has many of the same features as Elasticsearch, Apache Solr, Algolia, and other full-text search solutions. The key difference is that it’s fully managed and deeply integrated with the MongoDB document model and MongoDB Atlas. With Atlas Search, you can easily build rich search functionality without the need to replicate your data elsewhere.
Check out our documentation for tutorials and other resources on Atlas Search.