This page describes the compatibility and limitations of MongoDB Search features on Atlas. For details about MongoDB Search compatibility with self-managed deployments, see Compatibility and Requirements for mongot.
Atlas兼容性
对于某些功能, MongoDB Search 可能需要特定版本的MongoDB。下表列出了需要特定MongoDB版本的MongoDB搜索功能。
MongoDB搜索功能 | 适合该功能的 MongoDB 版本 |
|---|---|
8.0 + | |
使用 | 8.1 + |
分片视图上的 | 8.2 + |
| 8.2 + |
7.0 +、 8.0 + | |
7.0 +、 8.0 + | |
7.0 +、 8.0 + | |
7.0 +、 8.0 + | |
7.0 +、 8.0 + | |
7.0 +、 8.0 + | |
7.0 +、 8.0 + | |
7.0 +、 8.0 + | |
7.0 +、 8.0 + | |
使用Atlas CLI进行MongoDB Search 本地部署 | 7.0 +、 8.0 + |
6.0.13+, 7.0.5+, 8.0+ |
MongoDB Search 不支持 时间序列集合。从 MongoDB 8.3 开始,在时间序列集合上运行 $search、$searchMeta 和 $vectorSearch 阶段会失败并显示错误消息。以前,这些阶段返回空结果。
MongoDB Search and MongoDB Vector Search on Atlas Infinite Clusters
MongoDB Search and MongoDB Vector Search are supported on Atlas Infinite clusters during public preview.
On an Atlas Infinite cluster, Atlas includes MongoDB Search and MongoDB Vector Search at no additional cost. The co-located MongoDB Search and MongoDB Vector Search indexes on each compute node are limited to 10 GB. If your indexes exceed 8 GB, Atlas can automatically migrate your search workloads to dedicated Search Nodes. To learn more, see Workload Isolation on Atlas Infinite clusters.
搜索免费集群和 Flex 集群限制
以下限制仅应用于免费集群和 Flex 集群上的MongoDB Search:
您创建的内容不能超过:
免费集群上的 3 索引(无论是
search还是vector类型)。针对 Flex 集群的 10 个索引。
当达到集群层允许的最大索引数时,您可以扩展集群层以创建更多索引。如果扩展集群层,则会在新的集群层上重建索引,从而触发初始同步。
An index definition JSON object cannot exceed 3 KB in size.
一个索引定义只能具有一个同义词映射。
构建包含超过 300 个字段的索引失败。
Lucene 的默认子句限制 1024 适用于为搜索创建的任何
BooleanQuery。同义词集合不能超过 10,000 个文档。
MongoDB Search 不支持使用Atlas 用户界面中的客户密钥管理的加密密钥对 MongoDB Search 索引进行加密。
注意
您可以请求新功能或使用MongoDB 反馈引擎对现有请求进行投票。
Search Playground 限制
要了解搜索游乐场的限制,请参阅搜索游乐场的限制。
支持的客户端
索引限制
如果您创建的 MongoDB Search 索引拥有或即将拥有超过 2.1 亿个索引对象,则必须使用 numPartitions 或 对集群进行分片。对于此限制,索引集合字段中的每个顶级文档或嵌套 embeddedDocument 都算作一个对象
默认下, MongoDB搜索会停止复制任何给定副本集成员或分片上增长超过 2.1 十亿个索引对象的单个索引的更改。这意味着您的索引仍然可查询,但可能会得到过时的结果。
如果您的集合包含 16MB(BSON 限制)的文档,MongoDB Search 将无法为该文档建立索引,导致您的索引变为 STALE,并需要完全重建索引。当文档上的更新操作导致变更流事件超过 16MB BSON 限制时,也可能会出现此问题。为了最大限度地降低索引过期的风险,请确保集合中的文档不超过 8MB。如果您的索引已过期,则必须从集合中删除大型文档,以便完成索引重建。
此外:
将您的文档结构化,以减少子文档或数组的大小。
避免执行更新或替换大字段、子文档或数组的操作。
要了解更多信息,请参阅 Change Streams 生产建议和 减少大型文档的大小。
要学习;了解有关索引限制的更多信息,请参阅:
字段类型限制
要了解字段类型的限制,请参阅:
其他限制
如果您使用的是聚集文档并将notablescan参数设立为true,则您的MongoDB搜索索引可能无法完成构建。要解决此问题,您必须将 notablescan 参数设立为 false 或检查日志以了解索引状态转换。
查询限制
操作符限制
要学习查询操作符的限制,请参阅:
选项兼容性及限制
要了解查询选项的兼容性和限制,请参阅: