Whether it’s looking for the best pizza nearby or filtering a list of support tickets by a customer, search powers almost every application in some way.
That’s why we're so excited to announce today that MongoDB Atlas Search is now generally available. We first launched our full-text search beta product last year, and since then we’ve seen interest from thousands of customers across different industries, from startups to the Fortune 500.
Atlas Search makes it easy for us to build features that help our users find what they need. Since it sits directly on top of our data, there's minimal infrastructure for our team to manage. It's fast and flexible, and we're excited to find new ways to implement it within our application.Trevor Marshall, Current
What’s new in MongoDB Atlas Search
In addition to being available on all tiers of MongoDB Atlas, Atlas Search is production-ready and fully featured to support your most common search use cases.
Build powerful search queries with $search
When we initially launched our full-text search beta, it was available via the
$searchBeta stage in the MongoDB aggregation framework. We have since replaced it with our official aggregation stage,
$search. It’s a drop-in replacement, so if you’re using
$searchBeta today it’s straightforward to update your apps.
$search stage, there are dozens of operators and options that you can use to refine your results. For example:
textoperator allows you to query analyzed text fields.
compoundoperator allows you to combine two or more operators into a single query using
wildcardoperator allows you to find matches using special characters in the query string that can match any character.
By building search logic in MongoDB, you can leverage native aggregation functionality for better performance and reduce the complexity of your apps.
Add type-ahead functionality with autocomplete
We’re all used to search bars responding as we type. This not only makes search faster, but the ability to preview results means we’re more likely to find exactly what we’re looking for.
With Atlas Search, it only takes a few steps to add this experience to your app. First, the
autocomplete index type allows you to specify which text fields in your documents should support type-ahead functionality. You can then specify options on the index to manage its size (as
autocomplete indexes are larger and more computationally expensive than a regular search index) and performance. These include the minimum and maximum number of characters to index in sequence, the tokenization strategy, and whether to remove diacritic marks from text. This is called diacritic folding, which makes it easier for users to perform latinized search across different languages.
Once your data is indexed to your liking, you can use the
autocomplete operator to build search queries. As mentioned earlier, operators come with powerful options that customize how you want results to be returned. In this case, you can set the order in which to search for tokens, boost or modify scores, and even enable fuzzy search to surface similar results.
Expand your search area with different data types
Our beta product was primarily focused on supporting text-based search, but since then we’ve introduced many more data types in the mix: dates, numbers, geoJSON, boolean, and ObjectID.
autocomplete, each of these come with an index type and various operators. For example, the geo type allows you to index shapes and points, which can then be queried using the
What’s next for Atlas Search
While we’re really excited to announce that Atlas Search is now generally available, we’re nowhere near done. There’s a lot on our product roadmap, all focused on making sure that Atlas Search is the easiest way for you to build fast, relevant, full-text search on top of your data in the cloud:
- Deeper integration with MongoDB: more performant aggregations involving the
$searchstage, sophisticated MQL support
- Support for advanced Lucene features: custom analyzers, synonyms, even more data types
- Better performance and monitoring: support for explain plans to help identify search query inefficiencies, faster queries
In search of more?
If you haven’t already tried Atlas Search, give it a go! It’s available on every tier, meaning you can get started in minutes. Simply sign up for an Atlas account, deploy a free M0 cluster, load our sample dataset, and dive right in.
For examples of Atlas Search in action, we have a lot of great content from MongoDB.live, our annual user conference:
- Check out our keynote demo showcasing the app we built to streamline WildAid’s marine protection efforts
- Watch a short demo of a movie search application created by Karen Huaulme, one of our Developer Advocates
- Hear from the CTO of one of our customers, Current, on why they switched from Elasticsearch to Atlas Search
- Learn how to write advanced search queries with Evan Nixon, a Senior Engineer on the Atlas Search team
Atlas Search documentation can be found here.
Try MongoDB in the Cloud
Create a free account and launch a cluster in minutes!