MongoDB Search Compatibility & Limitations

For the complete MongoDB documentation index, see www.mongodb.com/docs/llms.txt

MongoDB Search Compatibility & Limitations

This page describes the compatibility and limitations of MongoDB Search features on Atlas. For details on MongoDB Search compatibility with self-managed deployments, see [Compatibility and Requirements for mongot.](https://www.mongodb.com/docs/search/self-managed/current/deployment/compatibility-requirements.md#std-label-mongot-compatibility-requirements

Important:

The feature described on this page is not currently supported on Atlas Infinite clusters during public preview. For the features supported in public preview, see [Public Preview Availability.](https://www.mongodb.com/docs/atlas/infinite/atlas-infinite-landing/#public-preview-availability

Atlas Compatibility

For certain features, MongoDB Search might require a specific version of MongoDB. The following table lists the MongoDB Search features that require specific MongoDB versions.

MongoDB Search Feature MongoDB Version for Feature
[Create indexes on Views](https://www.mongodb.com/docs/search/about/view-support.md#std-label-fts-transform-documents-collections 8.0+
Query Views directly with [$search](https://www.mongodb.com/docs/search/query/aggregation-stages/search.md#mongodb-pipeline-pipe.-search and [$searchMeta](https://www.mongodb.com/docs/search/query/aggregation-stages/searchmeta.md#mongodb-pipeline-pipe.-searchMeta 8.1+
[$search](https://www.mongodb.com/docs/search/query/aggregation-stages/search.md#mongodb-pipeline-pipe.-search and [$searchMeta](https://www.mongodb.com/docs/search/query/aggregation-stages/searchmeta.md#mongodb-pipeline-pipe.-searchMeta on sharded views 8.2+
[$rankFusion](https://www.mongodb.com/docs/manual/reference/operator/aggregation/rankFusion.md#mongodb-pipeline-pipe.-rankFusion on Views 8.2+
[Facets](https://www.mongodb.com/docs/search/query/operators-collectors/facet.md#std-label-fts-facet-ref 7.0+, 8.0+
[Facets on Sharded Clusters](https://www.mongodb.com/docs/search/query/operators-collectors/facet.md#std-label-fts-facet-ref 7.0+, 8.0+
[Stored Source Fields](https://www.mongodb.com/docs/search/indexes/stored-source-definition.md#std-label-fts-stored-source-definition 7.0+, 8.0+
[$lookup with $search](https://www.mongodb.com/docs/search/tutorial/cross-collection-tutorials.md#std-label-lookup-with-search-tutorial 7.0+, 8.0+
[$unionWith with $search](https://www.mongodb.com/docs/search/tutorial/cross-collection-tutorials.md#std-label-search-with-unionwith-tutorial 7.0+, 8.0+
[Sort](https://www.mongodb.com/docs/search/query/sort.md#std-label-sort-ref 7.0+, 8.0+
[Sort on Sharded Clusters](https://www.mongodb.com/docs/search/query/sort.md#std-label-sort-ref 7.0+, 8.0+
[Dedicated Search Nodes](https://www.mongodb.com/docs/atlas/cluster-config/multi-cloud-distribution.md#std-label-configure-search-nodes 7.0+, 8.0+
[Manage search indexes programmatically with mongosh and MongoDB Drivers](https://www.mongodb.com/docs/search/indexes/manage-indexes.md#std-label-fts-about-indexing 7.0+, 8.0+
[MongoDB Search local deployment](https://www.mongodb.com/docs/atlas/cli/current/atlas-cli-deploy-local/#use-atlas-search-with-a-local-atlas-deployment with the Atlas CLI 7.0+, 8.0+
[$search](https://www.mongodb.com/docs/search/query/aggregation-stages/search.md#mongodb-pipeline-pipe.-search searchAfter and searchBefore [options](https://www.mongodb.com/docs/search/query/paginate-results.md#std-label-fts-paginate-results 6.0.13+, 7.0.5+, 8.0+

MongoDB Search is not supported for [time series](https://www.mongodb.com/docs/manual/core/timeseries-collections.md#std-label-manual-timeseries-landing collections. Starting in MongoDB 8.3, the [$search](https://www.mongodb.com/docs/search/query/aggregation-stages/search.md#mongodb-pipeline-pipe.-search, [$searchMeta](https://www.mongodb.com/docs/search/query/aggregation-stages/searchmeta.md#mongodb-pipeline-pipe.-searchMeta, and [$vectorSearch](https://www.mongodb.com/docs/vector-search/query/aggregation-stages/vector-search-stage.md#mongodb-pipeline-pipe.-vectorSearch stages fail with an error message when run on timeseries collections. Previously, these stages returned empty results.

Search Free Cluster and Flex Clusters Limitations

The following limitations apply to MongoDB Search on Free clusters and Flex clusters only:

  • You cannot create more than:
  • 3 indexes (regardless of the type, search or vector) on Free clusters.

  • 10 indexes on Flex clusters.

  • When you reach the maximum number of indexes allowed for the cluster tier, you can scale your cluster tier to create additional indexes. If you scale your cluster tier, the indexes are rebuilt on the new cluster tier, which triggers an [initial sync.](https://www.mongodb.com/docs/search/performance/index-performance.md#std-label-troubleshoot-initial-sync

  • An index definition JSON object cannot exceed 3KB in size.

  • An index definition can have only one [synonym mapping.](https://www.mongodb.com/docs/search/indexes/synonyms.md#std-label-synonyms-ref

  • Index builds with more than 300 fields fail.

  • Lucene's default clause limit of 1024 applies to any BooleanQuery created for searches.

  • The [synonyms collection](https://www.mongodb.com/docs/search/indexes/synonyms.md#std-label-synonyms-coll-spec can't exceed 10,000 documents.

  • MongoDB Search doesn't support encrypting MongoDB Search indexes with [encryption keys using Customer Key Management](https://www.mongodb.com/docs/atlas/security-kms-encryption.md#std-label-security-kms-encryption in the Atlas UI.

Note:

You can request new functionality or upvote an existing request using the MongoDB Feedback Engine.

Search Playground Limitations

To learn about Search Playground limitations, see [Search Playground Limitations.](https://www.mongodb.com/docs/search/about/playground.md#std-label-fts-playground-limitations

Supported Clients

To learn about supported clients, see [Indexes](https://www.mongodb.com/docs/search/indexes/manage-indexes.md#std-label-fts-about-indexing and [Queries.](https://www.mongodb.com/docs/search/query/query-ref.md#std-label-ref-query-management

Index Limitations

If you create a MongoDB Search index that has or will soon have more than 2.1 billion index objects, you must use numPartitions or [shard your cluster](https://www.mongodb.com/docs/atlas/cluster-additional-settings.md#std-label-create-cluster-sharding. For this limit, each top-level document or nested embeddedDocument in the indexed collection fields counts as one object

By default, MongoDB Search stops replicating changes for a single index that grows larger than 2.1 billion index objects on any given replica set member or shard. This means your index remains queryable, but you might get stale results.

If your collection contains documents that are 16MB (BSON (Binary Javascript Object Notation) limit), MongoDB Search fails to index the document, causes your index to become STALE.

In addition:

  • Structure your documents to minimize the size of sub-documents or arrays.

  • Avoid operations that update or replace large fields, sub-documents, or arrays.

To learn more, see Change Streams Production Recommendations and Reduce the Size of Large Documents.

To learn more about index limitations, see:

  • [Considerations for MongoDB Search Indexes](https://www.mongodb.com/docs/search/indexes/manage-indexes.md#std-label-ref-index-considerations

  • [Multi Analyzer Limitations](https://www.mongodb.com/docs/search/indexes/analyzers/multi.md#std-label-ref-multi-limitations

  • [Data Type Limitations](https://www.mongodb.com/docs/search/indexes/define-field-mappings.md#std-label-bson-data-types-limitations

Field Type Limitations

To learn about field type limitations, see:

  • [dateFacet Type Limitations](https://www.mongodb.com/docs/search/indexes/field-types/date-facet-type.md#std-label-date-facet-limitations

  • [document Type Limitations](https://www.mongodb.com/docs/search/indexes/field-types/document-type.md#std-label-document-type-limitations

  • [embeddedDocuments Type Limitations](https://www.mongodb.com/docs/search/indexes/field-types/embedded-documents-type.md#std-label-fts-embedded-documents-type-limitations

  • [knnVector Type Limitations](https://www.mongodb.com/docs/search/indexes/field-types/knn-vector.md#std-label-fts-knn-vector-type-limitations

  • [numberFacet Type Limitations](https://www.mongodb.com/docs/search/indexes/field-types/number-facet-type.md#std-label-fts-number-facet-type-limitations

  • [How to Index String Fields](https://www.mongodb.com/docs/search/indexes/field-types/string-type.md#std-label-fts-field-types-string-limitations

  • [How to Index Token Fields](https://www.mongodb.com/docs/search/indexes/field-types/token-type.md#std-label-fts-token-type-limitations

Other Limitations

If you're using a [clustered collection](https://www.mongodb.com/docs/manual/core/clustered-collections.md#std-label-clustered-collections and have the [notablescan](https://www.mongodb.com/docs/manual/reference/parameters.md#mongodb-parameter-param.notablescan parameter set to true, your MongoDB Search indexes may not finish building. To resolve this issue, you must set the notablescan parameter to false or check your log for index status transitions.

Query Limitations

Operator Limitations

To learn about query operator limitations, see:

  • [embeddedDocument Operator Limitations](https://www.mongodb.com/docs/search/query/operators-collectors/embedded-document.md#std-label-embedded-document-query-limitations

  • [Limitations](https://www.mongodb.com/docs/search/query/operators-collectors/facet.md#std-label-fts-facet-limitations

  • [moreLikeThis Operator Limitations](https://www.mongodb.com/docs/search/query/operators-collectors/morelikethis.md#std-label-more-like-this-limitations

  • [near Operator Limitations](https://www.mongodb.com/docs/search/query/operators-collectors/near.md#std-label-near-query-limitations

Option Compatibility and Limitations

To learn about query option compatibility and limitations, see:

  • [sort Option Compatibility](https://www.mongodb.com/docs/search/query/sort.md#std-label-sort-compatibility-ref and [sort Option Limitations](https://www.mongodb.com/docs/search/query/sort.md#std-label-sort-option-limitations

  • [concurrent Option Limitations](https://www.mongodb.com/docs/search/query/concurrent-query.md#std-label-concurrent-option-limitations

  • [highlight Option Limitations](https://www.mongodb.com/docs/search/query/highlighting.md#std-label-highlight-limitations