Docs Menu
Docs Home
/ /

Text Search

MongoDB provides text search capabilities for both MongoDB Atlas and self-managed deployments.

Note

$search, $searchMeta, and $vectorSearch are now available in self-managed deployments. We recommend using these aggregation stages instead of the $text operator, as they offer an improved full-text-query solution.

To perform text search, use MongoDB Search. MongoDB Search supports fine-grained text indexing and a rich query language for fast, relevant search results.

To learn more and get started with MongoDB Search, see:

MongoDB Search also offers common analyzers for parsing text for full-text search, including support for over 40 language-specific analyzers.

To perform vector search on your data hosted on MongoDB, use MongoDB Vector Search. MongoDB Vector Search extends your text search capabilities to include semantic, hybrid, and generative search.

To learn more and get started with MongoDB Vector Search, see:

MongoDB also provides the $text operator. However, we recommend using the $search aggregation stage as it offers advanced full-text search options, including:

  • Fuzzy matching and autocomplete.

  • Relevance scoring.

  • Support for search using synonyms and facets.

  • Search term highlighting.

  • More language analyzers.

To learn more about $text queries, see $text Queries.

Back

Natural Language to MongoDB

On this page