启用和使用MongoDB Search 是否需要付费?
不需要,在集群上启用MongoDB Search 时,不会产生任何额外费用或收费。但是,您可能会发现集群上的资源利用率有所增加,具体取决于索引集合大小或索引定义等因素。要管理和控制MongoDB搜索资源利用率,您可以部署专用搜索节点,这是每个节点的额外费用。我们建议在您的生产环境中使用此方法。
我是否可以运行与MongoDB Search 查询匹配的部分字符串?
是的。以下MongoDB Search 操作符支持部分字符串匹配查询:
我是否可以使用 wildcard 或 regex 操作符执行不区分大小写的搜索?
是。您可以将 wildcard 和 regex 操作符与自定义分析器一起使用,以执行不区分大小写的搜索。您可以使用以下分词器和词元筛选器定义自定义分析器,以执行通配符不区分大小写搜索:
storedSource是否支持字段上不区分大小写的排序规则?
是的。MongoDB Search StoredSource 选项存储原始值。要在 $search 阶段之后对使用 returnStoredSource 选项返回的结果执行不区分大小写的操作,必须在创建集合时将集合的默认规则强度设立为 1 或 2,并且不得指定其他排序规则在查询和索引中。
MongoDB Search 索引如何在分片上工作?
If you add shards to a collection with an existing MongoDB Search index, an initial sync occurs on the newly added shards for that MongoDB Search index. Each shard's MongoDB Search index contains only the documents from the collection that exists on that shard. To learn more, see Shard a Global Collection.
警告:如果对已经有 MongoDB Search 索引的集合进行分片,在分片上建立索引时,可能会出现搜索结果不完整的短暂现象。此外,如果您为包含 MongoDB Search 索引的分片集合添加分片,在添加的分片完成初始同步过程之前,针对该集合的搜索查询可能会返回不完整的结果。要了解更多信息,请参阅初始同步进程。
我是否可以使用分片键对特定分片运行MongoDB Search 查询?
不可以,您不能使用分片键对特定分片或分片子集运行MongoDB Search 查询。在分片集群环境中, MongoDB搜索查询是在所有分片上运行的分散-聚集查询。
However, if you use zones to distribute a sharded collection over a subset of the shards in the cluster, MongoDB Search routes the query to the zone that contains the shards for the collection that you are querying and runs your $search queries on just the shards where the collection is located.
查询是在主节点还是从节点上运行?
By default, queries run on the primary node. You can configure your read preference or use replica set tags to specify read preference. To learn more, see What is MongoDB Search?.
我是否可以复制索引?
是,您可以执行以下操作以复制索引:
在Atlas中,转到集群的 Search & Vector Search 页面。
您可以从 Search & Vector Search 选项或 Data Explorer go 到 MongoDB搜索页面。
如果尚未显示,请从导航栏上的 Organizations 菜单中选择包含项目的组织。
如果尚未显示,请从导航栏的 Projects 菜单中选择您的项目。
在侧边栏中,单击 Database 标题下的 Search & Vector Search。
If you have no clusters, click Create cluster to create one. To learn more, see Create a Cluster.
如果您的项目有多个集群,请从 Select cluster 下拉列表中选择要使用的集群,然后单击 Go to Search。
The Search & Vector Search page displays.
如果尚未显示,请从导航栏上的 Organizations 菜单中选择包含项目的组织。
如果尚未显示,请从导航栏的 Projects 菜单中选择您的项目。
在侧边栏中,单击 Database 标题下的 Data Explorer。
展开数据库并选择集合。
单击该集合的 Indexes 标签页。
单击横幅中的 Search and Vector Search 链接。
The Search & Vector Search page displays.
创建新的MongoDB Search索引。
使用MongoDB Search JSON Editor 创建新索引。粘贴您复制的索引,然后单击 Create Search Index。创建MongoDB搜索索引后,您可以直接在MongoDB搜索 JSON Editor 或MongoDB搜索 Visual Index Builder 中进行所需的任何编辑。
MongoDB Search 是否会将我的整个索引存储在内存中?
No, MongoDB Search uses memory for the JVM heap metrics, which stores the autocomplete and text tokens of your search index. Similar to other database engines, MongoDB Search stores the majority of the index files on the disk, which benefits from the underlying OS page cache.
为什么我的搜索索引消失了?
验证您输入的数据库和集合名称是否正确。如果您输入的数据库或集合名称不存在,Atlas 用户界面将临时构建索引并在不久后将其删除。
If you use the
$outaggregation stage to overwrite your collection, you must delete and recreate your search index, as search indexes aren't copied to destination collections. To learn more, see $out Index Constraints.
我是否可以从云备份快照恢复MongoDB Search 索引?
对于 M10+ 专用集群,Atlas 会从云备份快照恢复 MongoDB Search 索引定义。Atlas不会恢复搜索索引数据,因此 mongot 进程会对所有恢复的搜索索引定义执行初始同步。如果在集群上定义了大型搜索索引,则在快照恢复期间可能会遇到延迟。
Does MongoDB Search work with CSFLE encrypting clients?
Yes, you can use CSFLE encrypting clients to run MongoDB Search queries against non-encrypted data in MongoDB version 6.0 and later.
是否可以查询CSFLE加密数据?
不可以,您无法使用MongoDB Search查询CSFLE加密数据。
我能否将Queryable Encryption与MongoDB Search 结合使用?
不可以,Queryable Encryption与MongoDB Search 不兼容。
我是否可以在时间序列集合上使用MongoDB Search?
不可以,您不能在时间序列集合上使用MongoDB Search。
我可以请求新功能吗?
是的,用户可以请求新功能,也可以使用MongoDB反馈对现有请求进行投票。
MongoDB 支持部门能否访问我的搜索基础设施和日志?
Yes, MongoDB Support can access your MongoDB Search infrastructure on both dedicated and co-located nodes, as well as download mongot logs from these nodes. However, you can block access for MongoDB Support at the organization level and then grant access to MongoDB Support for 24 hours if needed. To learn more, see Configure MongoDB Support Access.
搜索节点的日志和诊断数据会存储多长时间?
Atlas 上传搜索节点日志,并使其可用于诊断和事件缓解的下载。在主机上,当日志达到磁盘空间占用率的 2% 时,mongot 将删除日志。
在从集群中删除搜索节点后,日志和诊断数据仍然不可用。
我可以跨多个集合运行 $search 查询吗?
No, however, you can use $lookup and $unionWith to run a search query across multiple collections. To learn more, see How to Run MongoDB Search Queries Across Multiple Collections.