发布日期: 2026-02-23
版本号: v1.36.0

Meilisearch v1.36.0版本对排名规则进行了重要更新,旨在提升搜索相关性,这是自v1.0版本以来的首次重大调整。新版本引入了attributeRankwordPosition两项新的排名规则,分别考虑了查询词在文档属性中的层级位置和匹配距离,以优化排序逻辑。同时,该版本继续推进向自研HNSW算法的迁移,新增了无转储升级步骤,用于将旧的Annoy向量存储迁移至新的Hannoy方案,此过程可能耗时数分钟,建议提前进行配置。此外,修复了在空索引上使用attributesToSearchOn进行搜索时可能出现的失败问题,并更新了多个依赖库以增强安全性。其他改进包括OpenAPI文档与CI的优化、贡献模板的调整以及测试输出的增强。值得注意的是,发布资产中不再包含meilisearch-openapi-mintlify.json文件,相关用户需改用公共文档仓库中的版本。

更新内容 (中文)

v1.36.0 版本为排名规则带来了令人兴奋的更新,以提升引擎的相关性。这实际上是我们自 v1.0 版本以来首次进行此类更改,我们对这次改进感到非常高兴!

✨ 增强功能

  • 由 @Kerollmops 在 https://github.com/meilisearch/meilisearch/pull/6154、https://github.com/meilisearch/meilisearch/pull/6155 和 https://github.com/meilisearch/meilisearch/pull/6164 中引入了 attributeRankwordPosition 标准。

    我们发布了两个新的排名规则,Meilisearch 内部已开始用于 attribute 规则,实际上就是依次应用这两个排名规则:

    • attributeRank:如果查询词在更高搜索属性中匹配,则认为文档更优。此规则忽略查询词在该属性中的位置。
    • wordPosition:如果查询词匹配位置更靠近属性的开头,则认为文档更优。此规则忽略属性排名。
  • 我们继续推进将用户迁移到使用自研 HNSW 的政策,引入了一个新的无转储升级步骤,用于将使用旧版 annoy 向量存储的索引迁移到新版 Hannoy 向量存储。更改向量存储后端会影响排名得分。当嵌入向量数量较多时,此步骤可能需要几分钟,我们建议您提前更改向量存储后端以便在需要时获得更多控制权。要执行此操作,您必须启用 vectorStoreSetting 实验性功能,并将根设置 vectorStore 设置为 experimental

🪲 错误修复

🔒 安全

🔩 杂项

[!WARNING] 破坏性变更:meilisearch-openapi-mintlify.json 文件将不再包含在发布资源中。如果您一直在使用它,请参考现在在我们的公共文档仓库中提供的版本。

❤️ 感谢 @zen-zap 对本版本的贡献!

更新内容 (原始)

Version v1.36.0 introduces an exciting update to the ranking rules to improve the engine’s relevance. It’s actually the first time we’ve made such a change since v1.0, and we’re really happy about this improvement!

✨ Enhancement

  • Introduce the attributeRank and wordPosition criteria by @Kerollmops in https://github.com/meilisearch/meilisearch/pull/6154, https://github.com/meilisearch/meilisearch/pull/6155, and https://github.com/meilisearch/meilisearch/pull/6164

    We released two new ranking rules that Meilisearch had already been using internally for the attribute one, which is basically both ranking rules applied one after the other:

    • attributeRank: A document is considered better if the query words match in a higher searchable attribute. It ignores the position of the query words in this attribute.
    • wordPosition: A document is considered better if the query words match closer to the beginning of an attribute. The attribute rank is ignored by this rule.
  • We continue our policy of migrating everyone to use a homemade HNSW by introducing a new dumpless upgrade step that migrates index uses the old annoy vector store to the new Hannoy one. Changing the vector store backend affects the ranking score. This step can take a couple of minutes when the number of embeddings is high, and we recommend changing the vector store backend beforehand to gain more control if needed. To do so, you must enable the vectorStoreSetting experimental feature and set the vectorStore root setting to experimental.

🪲 Bug fixes

🔒 Security

🔩 Miscellaneous

[!WARNING] Breaking change: the meilisearch-openapi-mintlify.json file will not be available in the release assets anymore. If you were using it, please refer to the one that is now available in our public documentation repository.

❤️ Thanks to @zen-zap for contributing to this release!

下载链接