发布日期: 2025-06-09
版本号: v1.15.0

Meilisearch v1.15 新增了禁用数字拼写容错的功能,并为字符串过滤器引入了比较操作符。所有官方集成工具均已兼容此版本,但部分 SDK 可能尚未包含全部新特性,具体需查阅各项目仓库。本次更新还包括多项改进,例如支持取消版本升级、优化快照生成、增加日志字段与任务统计,以及修复了搜索定位计算、地理排名和错误提示等问题。版本还更新了多项依赖并完善了持续集成流程。

更新内容 (中文)

Meilisearch v1.15 新增了拼写容错设置,允许为数字禁用拼写容错功能。同时支持对字符串过滤器使用比较运算符。

🧰 所有官方 Meilisearch 集成(包括 SDK、客户端及其他工具)均兼容此版本。新版本发布后,集成部署需时 4 至 48 小时。

部分 SDK 可能尚未包含所有新功能。请查阅项目仓库获取详细信息。如果所选 SDK 缺少所需功能,请创建 Issue 告知我们需求,或通过提交 PR 实现该功能(我们将不胜感激 ❤️)。

新功能与更新 🔥

为数字禁用拼写容错

typoTolerance.disableOnNumbers 设为 true 可为数字禁用拼写容错:

curl -X POST 'http://localhost:7700/indexes/movies/settings' \
  -H 'Content-Type: application/json' \
  -d '{
    "typoTolerance": {"disableOnNumbers": true}
  }'

此功能有助于减少误报(例如搜索词 2024 不再返回 20252004 的结果),同时可能提升索引性能。

由 @ManyTheFish 在 #5494 实现。

字典序字符串过滤

本版本启用字符串值的比较运算符(<, <=, >, >=, TO),支持字典序过滤:

curl -X POST 'http://localhost:7700/indexes/movies/search' \
  -H 'Content-Type: application/json' \
  -d '{
    "filter": "release_date >= '2024-06'"
  }'

该功能特别适用于过滤人类可读日期格式。

由 @dureuill 在 #5535 实现。

其他改进

  • 支持通过回滚所有已升级索引来取消版本升级 (@dureuill #5523)
  • 支持 EC 私钥作为 SSL 证书 (@HDT3213 #5471)
  • 通过相关 CLI 选项 停止压缩快照以加速生成 (@dureuill 与 @irevoire #5498#5560)
  • 在批次统计中新增 batchStrategy 字段 (@dureuill #5488#5530#5588)
  • 新增向量存储搜索耗时日志字段 (@Kerollmops #5525)
  • 优化可过滤字段错误信息 (@CodeMan62 #5425)
  • 优化嵌入向量维度不匹配的错误信息 (@vuthanhtung2412 #5449)
  • 更新 /network URL 验证错误信息格式 (@CodeMan62 #5486)
  • 在 Prometheus 指标中暴露任务队列状态大小 (@DanasFi #5512)

问题修复 🐞

  • 修复 _matchesPosition 长度计算以改善客户端裁剪效果 (@shaokeyibb #5446)
  • 修复 _geo 排序规则问题 (@HDT3213 #5487)
  • 修复搜索前缀可能超过 65k 匹配项时的拼写检查 panic 问题 (@dureuill #5564)
  • 确保将 MEILI_EXPERIMENTAL_MAX_NUMBER_OF_BATCHED_TASKS 设为 0 时完全停止处理所有任务 (@irevoire #5565)
  • 禁止在索引设置中将 maxTotalHits 设为 0 (@irevoire #5566)
  • 不再拒绝使用文档数组过滤器(如 join)的 documentTemplate (@dureuill #5593)

杂项

  • 依赖更新
    • 升级 Rust 至 1.85.1 (@Kerollmops #5480)
    • 升级 charabia 至 v0.9.3 (@ManyTheFish #5466)
    • 升级 Prometheus 修复安全漏洞 (@Kerollmops #5513)
  • CI 与测试
    • 设置里程碑 CI 更新规则集 (@Kerollmops #5444)
    • 适配 GitHub 合并队列分组功能 (@Kerollmops #5445)
    • 移除仓库中的 Bors 引用 (@Kerollmops #5447)
    • 拆分任务单元测试 (@shu-kitamura #5424)
  • 其他
    • 改进无转储升级兼容性 (@irevoire #5395)
    • 修正 README 中的链接和格式以增强一致性 (@ZeroZ-lab #5533)

❤️ 再次感谢外部贡献者:

  • Meilisearch:@shu-kitamura、@shaokeyibb、@CodeMan62、@vuthanhtung2412、@HDT3213、@DanasFi、@ZeroZ-lab。
  • Charabia:@luflow、@mosuka、@HDT3213。
  • RoaringBitmap:@lucascool12、@Dr-Emann。

更新内容 (原始)

Meilisearch v1.15 adds a new typo tolerance setting, allowing you to disable typo tolerance for numbers. It also enables comparison operators for string filters.

🧰 All official Meilisearch integrations (including SDKs, clients, and other tools) are compatible with this Meilisearch release. Integration deployment takes 4 to 48 hours after a new version becomes available.

Some SDKs might not include all new features. Please look over the project repository for detailed information. Is a feature you need missing from your chosen SDK? Create an issue letting us know you need it, or, for open-source karma points, open a PR implementing it (we’ll love you for that ❤️).

New features and updates 🔥

Disable typo tolerance for numbers

Set typoTolerance.disableOnNumbers to true to disable typo tolerance for numbers:

curl -X POST 'http://localhost:7700/indexes/movies/settings' \
  -H 'Content-Type: application/json' \
  -d '{
    "typoTolerance": {"disableOnNumbers": true}
  }'

Deactivating the typo tolerance on numbers can be helpful when trying to reduce false positives, such as a query term 2024 returning results that include 2025 and 2004. It may also improve indexing performance.

Done by @ManyTheFish in #5494.

Lexicographic string filters

This release allows you to filter strings lexicographically by enabling comparison operators (<, <=, >, >=, TO) on string values:

curl -X POST 'http://localhost:7700/indexes/movies/search' \
  -H 'Content-Type: application/json' \
  -d '{
    "filter": "release_date >= '2024-06'"
  }'

This new feature can be particularly useful when filtering human-readable dates.

Done by @dureuill in #5535.

Other improvements

  • Allows cancelling an upgrade to a new Meilisearch version by rolling back all upgraded indexes by @dureuill in #5523
  • Support EC private key as SSL certificate by @HDT3213 in #5471
  • When passing the relevant CLI option, stop compacting snapshots, to speed up their generation by @dureuill and @irevoire in #5498 and #5560
  • Add new batchStrategy field in the batches stats by @dureuill in #5488, #5530, and #5588
  • Add log field tracking time spent searching in the vector store by @Kerollmops in #5525
  • Improve filterable error messages by @CodeMan62 in #5425
  • Improve error messages on embeddings dimension mismatch by @vuthanhtung2412 in #5449
  • Update /network URL validation error message format by @CodeMan62 in #5486
  • Expose the task queue’s status size in the Prometheus metrics by @DanasFi in #5512

Fixes 🐞

  • Fix _matchesPosition length calculation to improve client-side cropping by @shaokeyibb in #5446
  • Fix _geo ranking rule by @HDT3213 in #5487
  • Fix a panic in the search that could happen when looking for typos with a search prefix having more than 65k possible hits in the DB by @dureuill in #5564
  • Make sure that passing MEILI_EXPERIMENTAL_MAX_NUMBER_OF_BATCHED_TASKS to 0 results in Meilisearch never processing any kind of task. By @irevoire in #5565
  • Forbid value 0 for maxTotalHits in the index settings by @irevoire in #5566
  • No longer reject documentTemplates that use array filters on documents (e.g. join) by @dureuill in #5593

Misc

  • Dependency updates
    • Update Rust to 1.85.1 by @Kerollmops in #5480
    • Update charabia v0.9.3 by @ManyTheFish in #5466
    • Update the Prometheus to fix a security vulnerability by @Kerollmops in #5513
  • CIs and tests
    • Setup the Milestone CI to update the Ruleset by @Kerollmops in #5444
    • Make the CI work with GitHub’s merge queue grouping by @Kerollmops in #5445
    • Remove Bors references from the repository by @Kerollmops in #5447
    • Split unit tests for tasks by @shu-kitamura in #5424
  • Misc
    • Improve dumpless upgrade compatibility by @irevoire in #5395
    • Fix links and formatting in README for clarity and consistency by @ZeroZ-lab in #5533

❤️ Thanks again to our external contributors:

  • Meilisearch: @shu-kitamura, @shaokeyibb, @CodeMan62, @vuthanhtung2412, @HDT3213, @DanasFi, and @ZeroZ-lab.
  • Charabia: @luflow, @mosuka, and @HDT3213.
  • RoaringBitmap: @lucascool12 and @Dr-Emann.

下载链接