对于 AI 代理:可在 https://www.mongodb.com/zh-cn/docs/llms.txt 获取文档索引—通过在任何 URL 路径后添加 .md 可获取所有页面的 Markdown 版本。
Docs 菜单

MongoDB Search 和 MongoDB 向量搜索 变更日志

注意

适用于 Atlas 托管的 MongoDB Search 和 MongoDB 向量搜索

This changelog applies only to MongoDB Search and MongoDB Vector Search hosted in Atlas. To find release notes for MongoDB Search and MongoDB Vector Search on self-managed Community and Enterprise editions, see the Self-Managed MongoDB Search and Vector Search Release Notes.

  • Adds Native Reranking through the $rerank aggregation stage for reordering input documents by using Voyage AI's reranking models.

  • 使 MongoDB 向量搜索索引中的嵌套嵌入支持全面可用。

  • Increases the maximum number of buckets to 10000 for number and date facets.
  • Increases the maximum number of buckets to 10000 for string facets.
  • Adds preview support for $vectorSearch over arrays of embeddings and arrays of embedded documents containing vectors.
  • Introduces the storedSource option for MongoDB Vector Search indexes to store source document fields with the index and return them in $vectorSearch results using returnStoredSource.
  • Adds support for multi-select faceting to enable users to filter by multiple buckets within the same facet without recomputing counts for the other buckets in that facet.
  • 通过 indexingMethod 选项的 flat 值,添加对 MongoDB 向量搜索中 平面索引 的预览支持。平面索引可以增强对多租户工作负载的支持,从而提高性能、回忆率和资源利用效率。

  • 如果 并发 设置为 true,则跨索引分区并发执行查询。

  • 通过添加 vectorSearch 操作符 和 向量索引类型,增加对向量搜索的词汇预过滤器的预览支持。这使您可以在执行向量相似搜索之前,根据分析的文本功能(例如模糊搜索、短语匹配、位置过滤器、通配符模式匹配等)过滤文档。
  • 对使用 multi 进行索引的 string 字段进行去重的存储费用。

  • 修复了针对高关联基数字段时的 token字段类型问题。

  • Supports $exists operator in the $vectorSearch pre-filter.

  • Adds support for configuring dynamic indexing with typeSets. To learn more, see Configure a typeSet.

  • Starting with MongoDB 8.0.14, the returnStoredSource and scoreDetails options must be set to true or false. Queries that specify null for these options will fail.

  • Adds support for specifying the stableTfl or boolean similarity algorithms when indexing string fields as the MongoDB Search string and autocomplete types. These algorithms are applied at query time to calculate MongoDB Search scores with the text, phrase, queryString, and autocomplete operators. To learn more, see Score Details.

  • Supports setting the $ne operator to null in MongoDB Vector Search pre-filters.

  • 通过始终从基本string字段检索突出显示来改进突出显示加载。

  • 跳过下载超过配置期限阈值的快照。

  • 更新 blobstore 凭证处理以使用新的 refreshDate字段,而不是已弃用的 expirationDate字段。

  • 添加所需的内存使用量指标。

  • Adds support for new token filter types keywordRepeat and removeDuplicates for custom analyzers.

  • Removes support for deprecated kp and lovins stemmers for the snowballStemming token filter type.

  • 更改 german 词干分析器对变音符号的处理方式,使德语字母 ä、ö 和 ü 分别扩展为 ae、oe 和 ue。

  • german2 词干分析器现已过时。

  • MongoDB v8.1 supports:

    • 使用 mongosh 和驱动程序方法在视图上创建搜索索引。

    • 对标准视图执行 $search、$searchMeta 和 $vectorSearch 查询。

  • 将向量维度限制增加到8192 。
  • 支持标量量化功能,可将向量搜索的主内存要求降低约 75%。

  • 支持二进制量化功能,可将向量搜索的主内存要求降低约 97%。

  • Supports ingesting int1 vectors using the new BinData vector subtype.

  • Supports ENN search using int8 and int1 subtypes.

  • 修复了磁盘已满时导致搜索节点崩溃的问题。
  • Supports synonyms in phrase queries.

  • Adds support for the matchCriteria field to the text operator.

  • 更改了同义词映射失败的索引的行为,令不使用受影响的同义词映射的查询能够成功运行。

  • 修复了在将 searchAfter 或 searchBefore 与搜索节点一起使用时导致一致性问题的错误。

  • 将达到索引对象限制的索引转换为可查询的 STALE 状态。

  • 支持对嵌入式文档中的词元类型进行索引。

  • Supports using the mongosh command or driver helper methods to create, retrieve, edit, or delete MongoDB Search indexes on M0, M2, or M5 Atlas clusters.

  • Supports ingesting float32 and int8 vectors using the new BSON vector type.

  • Supports pre-filtering using arrays with all operators.

  • 支持在MongoDB Vector Search 预筛选器中将 ObjectId 与范围操作符结合使用。

  • 支持在MongoDB Vector Search 预筛选器中将 UUID 值与所有操作符一起使用。

  • Supports using the $not operator in MongoDB Vector Search pre-filters.

对于 MongoDB Search:

  • 升级到 Java 21 。

    Java 21 支持 SIMD,这增加了 CPU 在进行向量比较时可以进行的并行处理量。

  • Updates all indexes to support the sort option for number and date types.

  • Automatically indexes null and UUID values if you enable dynamic mappings, which might increase the size of your index.

  • Supports using the range operator and sort option with ObjectId types.

  • Supports using the sort option with boolean values.

注意

Atlas 以滚动方式重新索引 Atlas 集群上所有现有的 MongoDB Search 索引。Atlas UI 将显示指示重新索引时间的警报。不使用独立搜索节点的集群可能会注意到,在重新索引过程中,磁盘和 CPU 利用率会临时增加。对于使用独立搜索节点的集群,Atlas 将临时免费部署额外节点以重新建立索引,因此,在完成新索引构建后,系统不会因为切换索引而停机。

  • Introduces MongoDB Search Query Templates in the Search Tester, which makes querying easier with pre-written $search queries including conditional clauses like must and should, autocomplete for search-as-you-type experiences, faceting, and more. To learn more, see Define Your Query.

  • Introduces changes to the MongoDB Search API endpoints. To learn more, see API Changelog for May 31 2024 Release.

  • 修复了以下问题:使用 returnStoredSource 时, MongoDB Search 未在结果中包含某些文档的 _id字段。
  • Fixes an issue where MongoDB Search triggered spurious initial syncs after certain mongod configuration changes.

  • 在缺少定义版本的情况下重建索引。

  • 修复了当分数并列时MongoDB Search 没有为 searchAfter 或 searchBefore 查询生成结果的问题。

  • Adds the ability to query and sort by null and UUID values.

  • Updates MongoDB Vector Search queries to run concurrently by default on search nodes.
  • Re-enables sort pruning.

  • Includes synonym queries in explain().

  • 将向量维度限制增加到4096 。

  • Fixes an issue where sharded Atlas clusters running MongoDB v7.2.0 would return an error for $searchMeta stages that contain the facet collector.
  • 支持在参考点之后或之前按顺序检索 $search 结果,您可以使用 $meta 关键字 searchSequenceToken 生成的令牌来指定参考点。要了解详情,请参阅 对结果进行分页。
  • Supports using equals, in, and range operators to perform exact matching and filtering on BSON strings indexed as the MongoDB Search token type.

注意

我们进程通过专用的MongoDB Vector Search索引定义推出新的MongoDB Vector Search 体验。它将在接下来的几天内或在下一个维护窗口之后在您的项目中可用。

Introduces $vectorSearch to perform semantic search on data in your Atlas cluster running MongoDB 7.0.2.

注意

MongoDB 向量搜索可作为预览功能使用,用于评估和收集用户反馈。不建议将其用于生产部署,因为在预览期间,该功能和相应文档可能会随时更改。

To learn more, see MongoDB Vector Search Overview.

  • 支持 自定义分析器 配置在 Atlas 用户界面可视化编辑器中。

  • Supports token type configuration in the Atlas UI Visual Editor.

  • 执行系统升级。您可能会注意到一些索引和查询性能变化。
  • Supports highlighting for fields if the fields are indexed under a parent field of type document for query predicates specified inside the embeddedDocument operator.

  • Starts initial sync automatically in certain scenarios with sharding.

  • Fixes a bug that caused changes to token field mapping to be ignored.

  • Adds the sort option, which supports sorting in ascending or descending order on fields that you define in your MongoDB Search index for sorting.

    注意

    MongoDB Search sort option is available in sharded clusters only if you run MongoDB v6.0+.

  • Limits the knnBeta operator as a top-level operator.

  • Introduces the ability to perform text, wildcard, regular expression, fuzzy, and range searches on string fields by using the queryString operator.

  • 提高 $search 与 $limit. 相结合使用时的性能

  • For Atlas clusters running MongoDB 6.0.8 or later on M10 or higher clusters, introduces ability to create and manage MongoDB Search indexes from mongosh and NodeJS driver.

    注意

    This release does not allow using the mongosh command or driver helper methods to create, retrieve, edit, or delete MongoDB Search indexes on M0, M2, or M5 Atlas clusters.

  • Provides preview of vector search to store, index, and query vectors using MongoDB Search.
  • 添加了对从 M10 或更大集群的云备份快照恢复MongoDB Search 索引的支持。
  • 支持跟踪查询中的搜索术语,并在 M10 或更高版本的 Atlas 集群的 Atlas 用户界面中查看所跟踪搜索术语的查询分析。
  • Adds the in operator, which performs a search for an array of values and returns documents where the value of the field equals any value in the specified array.

  • Changes the operator option of the facet collector to be optional. facet queries that you specify without an operator run over all indexed documents.

  • Introduces the ability to edit your MongoDB Search query in the Search Tester.
  • Supports the embeddedDocuments type in the MongoDB Search visual editor configuration mode in the Atlas UI.
  • Supports statically indexing arrays of strings as the autocomplete type and querying the indexed field using the autocomplete operator.

  • Supports dynamically and statically indexing numbers in arrays and querying the indexed numbers in arrays using the range operator only.

  • Supports dynamically and statically indexing dates in arrays and querying the indexed dates in arrays using the range operator only.

  • Supports dynamically and statically indexing objectIds and arrays of objectIds and querying the indexed objectIds using the equals operator.

  • Supports dynamically and statically indexing booleans and arrays of booleans and querying the booleans using the equals operator.

  • 升级到MongoDB Search,其中包括:

    • 查询改进

      • 支持在正则表达式查询中使用 \w、\W、\D、\s 和 \S 正则表达式。但是, MongoDB Search 在正则表达式查询中不会返回 s、S、w、W、d 和 D 以外的字符的结果。我们建议根据正则表达式标准使用反斜杠。

      • Updates to email tokenizer top-level domains from the IANA Root Zone Database.

    • 突出显示改进

      • 段落选择器会截断长片段以显示较短的片段,从而修复了当段落较长时查询失败的原因。
    • Explain output for some queries might look different. If you use explain, verify that the changes don't break logic in your environment.

    除了前面的更改列表之外,您可能会注意到一些索引和查询性能变化。

  • Introduces moreLikeThis operator to retrieve documents similar to one or more input documents.

  • 优化内部批处理,在查询匹配大量文档(如 5,000 个或更多)时提高存储源查询的性能。
  • 引入新的Project Search Index Editor角色,以使用Atlas用户界面或API创建、查看、编辑和删除MongoDB搜索索引。

  • 如果新索引定义无效,则使用上一个有效索引处理查询。

  • Removes Lucene's default clause limit of 1024 for BooleanQuery on dedicated clusters.

    注意

    We are extending support for faceting on numeric and date fields using the number and date types from August to September 2022. You must migrate to the numberFacet and dateFacet types in all index definitions for faceting on numeric and date fields, respectively.

  • Adds the numberFacet and dateFacet data types for running facet queries on number and date fields respectively.

    注意

    We are extending support for faceting on numeric and date fields using the number and date types from August to September 2022. You must migrate to the numberFacet and dateFacet types in all index definitions for faceting on numeric and date fields, respectively.

  • Adds reverse token filter, which reverses each string token.

Autocomplete improvements in this release:

  • Adds support for analyzers in the index definition for autocomplete.

  • 增强 autocomplete 操作符中的精确匹配。

  • Adds rightEdgeGram tokenization strategy to create edgeGram-like tokens starting at the right side of words (instead of the left side).

此版本包含的错误修复:

  • 修复objectId突出显示错误。
  • 允许索引进入恢复状态并在遇到某些复制错误后保持可用。
  • Adds support for synonyms, which can be defined in a source collection and mapped to search indexes via the Atlas API.
  • Adds stopword token filter for removing tokens that match the specified stop words.
  • Supports explain for $search queries.
  • Fixes an issue with highlighting raising errors when combined with ObjectID equality operators.
  • 提高初始同步索引的性能。
  • Adds maxNumPassages and maxCharsToExamine for highlight.
  • 提高稳定状态索引的性能。
  • 删除重建修改的索引定义时的停机时间要求。
  • 增加了对通配符路径的支持。
  • Adds a new index option to exclude the norms field, allowing a search index to ignore field length when scoring search results.

  • Adds the tokenOrder option to the autocomplete operator, supporting unordered terms in search queries.

  • 改进了错误消息以利于查询调试,包括消除堆栈跟踪和其他特定于 Java 的消息。

  • 添加对地理空间查询的支持,包括:

    • A new geo data type for indexing geographic point and shape coordinates.

    • Two new operators, geoWithin and geoShape, to support queries on geospatial data, such as points and polygons.

  • 添加自动完成功能以支持更好的输入时搜索功能,包括:

    • 对字段值进行不考虑特定分析器的重音字母折叠操作。

    • 评分选项,例如 boost 和 constant。

    • 自动完成与其他 $search 操作符组合在一起的复合查询。

    • 来自分析文本的 n-grams/shingles 和边缘 n-grams。

注意

要查看4 月 2020之前发布的MongoDB Search发布说明,请参阅Atlas Changelog。