MongoDB Atlas Search vs. Elastic Elasticsearch
Frequently asked questions
Full-text search is a technology used to efficiently query, filter, and display matching data from vast corpuses of stored information. Despite its name, almost any type of data can be searched—it’s not just text!
A well-implemented full-text search solution delivers fast and relevant search experiences to your application’s users. It deepens their engagement and improves satisfaction by making data more discoverable, usable, and valuable.
The key to full-text search is the inverted index—a specialized structure for indexing and storing data that’s optimized for efficient search queries. 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.
Operational databases are ideal when you know exactly what information you are looking to retrieve (i.e., “show me all customers that have created an Atlas Search index in the past month”). When developers know these queries upfront, the appropriate indexes can be defined on the data.
Full-text search is ideal when your users' queries are open-ended, and open to suggestions (i.e., “show me the most valuable articles on Atlas Search”). In these instances, inverted indexes are much more efficient at returning the most relevant results.
Full-text search engines also offer additional features that operational databases either ignore or implement partially, including fuzzy search (typo-tolerance), autocomplete (typeahead and presenting suggested search terms), faceted navigation (displaying categories of search results), synonyms (to define similar search terms), custom scoring (to tune the relevance of search results), and analyzers (to control how data is indexed).
Both have different use cases. In application search scenarios, Elasticsearch is generally used as a bolt-on search engine, while MongoDB Atlas is a platform that allows three systems to be compressed into a single solution.
By integrating a database, search engine, and sync mechanism into a single, unified and fully managed platform, Atlas Search is the fastest and easiest way to build relevance-based search directly into your applications.
When Elasticsearch is used with MongoDB, data needs to be synchronized between the two systems. Some tools like Kafka or dedicated ETL processes exist to perform this complicated task. Atlas Search abstracts and automates this overhead, handling the changes in both data and schema. With Atlas Search, this is a fully managed process without requiring any manual setup, configuration, or on-going maintenance.
Yes, Atlas Search is available for both free-tier and paid customers.
Atlas Search is priced the same way as other data storage and compute resources are calculated for Atlas. There is no separately priced SKU, and it consumes the same Atlas Credits. Details of how Atlas is billed can be found in our documentation. Additionally, MongoDB Atlas Search is available via the AWS Marketplace, Google Cloud Marketplace, and Microsoft Azure Marketplace. In each case, these help streamline procurement to align with your existing cloud provider's services.
For information on how to set up or use Atlas Search, see Atlas Search Docs.
Yes. Partial string matching queries are possible by using the following Atlas Search operators:
Yes. It is possible to perform a case-insensitive search using a custom analyzer alongside the wildcard and regex operators.
To perform a wildcard case-insensitive search, the custom analyzer is defined using the following tokenizer and token filter:
- keyword tokenizer
- lowercase token filter
Yes, using the Atlas CLI.
MongoDB offers legacy 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:
- Better results: 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 also powers Elasticsearch and Solr.
- Rich feature set: Atlas Search offers support for over 35 languages, multiple data types, fuzzy search, autocomplete, synonyms, custom scoring, index intersection, highlighting, and multiple search indexes per collection.
- Defined roadmap: Atlas Search is constantly being improved with new features that help us increase the range of use cases you can target with Atlas Search.
Get started with Atlas today
- 125+ regions worldwide
- Sample data sets
- Always-on authentication
- End-to-end encryption
- Command line tools