meilisearch v1.12.0-rc.0 版本更新介绍
发布日期: 2024-11-25
版本号: v1.12.0-rc.0
Meilisearch v1.12目前为候选发布版本(RC),不建议在生产环境中使用。该版本重点提升了大规模数据集(数百万文档)的索引速度,导入时间缩短至原有一半,并支持通过自定义配置进一步优化索引效率。新增了
GET /batches
和GET /batches/:uid
接口,提供索引任务的批次状态监控功能,任务对象新增batch
字段。其他改进包括:为GET /tasks
接口添加reverse
参数以控制任务返回顺序、优化短语匹配逻辑、增加Prometheus监控指标、支持匹配位置在数组中的索引标记。修复了主键超过512字节时的错误处理。此外,项目依赖项进行了更新,优化了部分测试性能,并修复了CI流程中的问题。团队特别致谢外部贡献者的代码提交。
更新内容 (中文)
[!WARNING] 由于当前版本为候选版本(RC),我们不推荐在生产环境中使用此版本。遇到非预期行为?欢迎提交错误报告与新功能反馈。
Meilisearch v1.12 针对索引速度进行了重大改进。团队通过精心优化使海量数据集(数百万级文档)的导入时间缩短了一半!您还可以通过自定义配置调整索引参数,从而适配不同场景下的索引速度需求。
新特性与更新 🔥
索引速度提升
海量数据集(数百万级文档)的索引时间缩短一半!
由 @dureuill、@ManyTheFish 和 @Kerollmops 在 #4900 中完成。
增强索引任务可见性
为提升索引任务处理过程的可观测性(特别是处理大型文档时),新增以下接口:
GET /batches/:uid
:返回指定批次
对象GET /batches
:返回批次
对象列表
该接口支持与GET /tasks
相同的查询参数进行过滤。
同时,任务对象中新增了batch
字段。
由 @irevoire 在 #5060、#5070、#5080 中完成。
其他改进
- 为
GET /tasks
接口新增reverse
查询参数,默认值为false
。设为true
时任务列表将按时间逆序排列(最早任务优先)。由 @irevoire 在 #5048 中完成。 - 优化短语匹配逻辑,将短语视为单一
Match
单元处理。由 @flevi29 在 #4928 中完成。 - 新增 Prometheus 监控指标。由 @PedroTurik 在 #5044 中完成。
- 在
_matchesPosition
中新增indices
字段以标识数组型字段的匹配位置。由 @LukasKalbertodt 在 #5005 中完成。
问题修复 🐞
- 主键超过 512 字节时返回规范化错误提示。由 @flevi29 在 #4930 中完成。
其他变更
- 依赖项更新
- 基准测试适配新的代码结构目录。由 @Kerollmops 在 #5021 中完成。
- 修复基准测试工具。由 @irevoire 在 #5037 中完成。
- 升级 Swatinem/rust-cache 从 2.7.1 至 2.7.5 版本。在 #5030 中完成。
- CI 与测试
- 优化
delete_index.rs
性能。由 @DerTimonius 在 #4963 中完成。 - 优化
create_index.rs
性能。由 @DerTimonius 在 #4962 中完成。 - 优化
get_documents.rs
性能。由 @PedroTurik 在 #5025 中完成。 - 优化
formatted.rs
性能。由 @PedroTurik 在 #5043 中完成。 - 修复 CI 中不稳定测试路径配置。由 @Kerollmops 在 #5049 中完成。
- 优化
- 其他
- 恢复 Meilisearch Kawaii 标识。由 @Kerollmops 在 #5017 中完成。
- Dockerfile 添加图片来源标注。由 @wuast94 在 #4990 中完成。
- 将代码复杂度模块重构至子目录。由 @Kerollmops 在 #5016 中完成。
- 内部工具:实现 v1.10 至 v1.11 离线升级。由 @irevoire 在 #5034 中完成。
❤️ 特别致谢外部贡献者:
- Meilisearch: @DerTimonius, @flevi29, @LukasKalbertodt, @PedroTurik, @wuast94
- Charabia
更新内容 (原始)
[!WARNING] Since this is a release candidate (RC), we do NOT recommend using it in a production environment. Is something not working as expected? We welcome bug reports and feedback about new features.
Meilisearch v1.12 introduces huge improvements regarding indexing speed. The team worked hard to divise time to import huge datasets by two. You can also customize your settings to adapt your indexing needs and so, the indexing speed that fits your usage.
New features and updates 🔥
Improve indexing speed
Indexing time for huge dataset import (multiple millions of documents) is divided by two!
Done by @dureuill, @ManyTheFish, and @Kerollmops in #4900.
More visibility around indexing tasks
In order to give more visibility around indexing processing around your task
, especially when indexing big documents, new routes have been introduced:
GET /batches/:uid
: returns a specificbatch
objectGET /batches
: return a list ofbatch
objects
The same query parameters than GET /tasks
route can be used to apply filtering.
Also, a new field is introduced in the task object: batch
.
Done by @irevoire in #5060, #5070, #5080
Other improvements
- Introduce the
reverse
query parameter forGET /tasks
route set tofalse
by default. If set totrue
, then the tasks will be returned in reversed order (the oldest first). Done by @irevoire in #5048. - Make matches consider phrases as a single
Match
by @flevi29 in #4928 - Adds new metrics to prometheus by @PedroTurik in #5044
- Add
indices
field to_matchesPosition
to specify where in an array a match comes from, by @LukasKalbertodt in #5005
Fixes 🐞
- Return an appropriate error when primary keys is greater than 512 bytes, by @flevi29 in #4930
Misc
- Dependencies updates
- Update benchmarks to match the new crates subfolder by @Kerollmops in #5021
- Fix the benchmarks by @irevoire in #5037
- Bump Swatinem/rust-cache from 2.7.1 to 2.7.5 in #5030
- CIs and tests
- Improve performance of
delete_index.rs
by @DerTimonius in #4963 - Improve performance of
create_index.rs
by @DerTimonius in #4962 - Improve performance of
get_documents.rs
by @PedroTurik in #5025 - Improve performance of
formatted.rs
by @PedroTurik in #5043 - Fix the path used in the flaky tests CI by @Kerollmops in #5049
- Improve performance of
- Misc
- Rollback the Meilisearch Kawaii logo by @Kerollmops in #5017
- Add image source label to Dockerfile by @wuast94 in #4990
- Hide code complexity into a subfolder by @Kerollmops in #5016
- Internal tool: implement offline upgrade from v1.10 to v1.11 by @irevoire in #5034
❤️ Thanks again to our external contributors:
- Meilisearch: @DerTimonius, @flevi29, @LukasKalbertodt, @PedroTurik, @wuast94
- Charabia