meilisearch v1.14.0 版本更新介绍
发布日期: 2025-04-14
版本号: v1.14.0
Meilisearch v1.14 版本提供了更细粒度的过滤器控制以优化索引性能,引入了复合嵌入器以改进搜索和索引时的向量生成,并新增了通过ID批量获取文档的接口。所有官方集成工具均兼容此版本,部分SDK可能尚未支持全部新功能。 新功能包括:1)细粒度可过滤属性设置,允许为每个文档属性单独启用或禁用不同的过滤类型以优化索引;2)复合嵌入器功能,支持在索引和搜索阶段分别使用不同的嵌入模型;3)新的文档批量检索接口,可通过ID列表获取多个文档。其他改进包括批量处理文档请求、增强分面搜索计数、降低内存消耗以及缓存搜索时的嵌入向量等。此外还修复了地理信息更新、前缀搜索及积分计算等若干问题,并更新了依赖库与测试用例。
更新内容 (中文)
Meilisearch v1.14 版本为索引性能优化提供了更精细的过滤器控制选项。此版本还引入了复合嵌入器(composite embedders),可在搜索和索引过程中提升向量生成效率,并新增了通过ID批量获取文档的接口。
🧰 所有官方 Meilisearch 集成(包括SDK、客户端及其他工具)均已兼容此版本。新版本发布后,集成部署将在4至48小时内完成。
部分SDK可能暂未包含所有新功能。请查阅项目仓库获取详细信息。若所选SDK缺少所需功能,可通过提交Issue告知我们,或直接发起PR实现(我们非常感谢您的贡献 ❤️)。
新特性与更新 🔥
细粒度可过滤属性设置
v1.14 版本允许您更精确地控制查询时禁用的过滤器类型,通过仅启用所需过滤功能进一步优化索引速度。
使用 PATCH /indexes/INDEX_NAME/settings 为文档中的每个属性配置启用的过滤器类型:
{
"filterableAttributes": [
{
"attributePatterns": ["genre", "artist"],
"features": {
"facetSearch": true,
"filter": {
"equality": true,
"comparison": false
}
}
},
{
"attributePatterns": ["rank"],
"features": {
"facetSearch": false,
"filter": {
"equality": true,
"comparison": true
}
}
}
]
}
详细文档请参阅专用文档页面。
由 @ManyTheFish 在 #5254 中实现。
复合嵌入器
此特性支持在搜索与索引阶段使用不同的嵌入器,适用于优化AI驱动的搜索性能。例如您可能需要:
- 索引时使用远程嵌入器(带宽更高,单位时间生成更多向量)
- 搜索时使用本地嵌入器(延迟更低,响应速度更快)
启用步骤:
- 通过 Meilisearch Cloud 界面或
/experimental-features路由启用复合嵌入器:
curl MEILISEARCH_URL/experimental-features \
-H 'Content-Type: application/json' \
-d '{"compositeEmbedders": true}'
- 创建嵌入器时将
source设为"composite",并分别定义searchEmbedder和indexingEmbedder:
{
"embedders": {
"text": {
"source": "composite",
"searchEmbedder": {
"source": "huggingFace",
"model": "baai/bge-base-en-v1.5",
"revision": "a5beb1e3e68b9ab74eb54cfd186867f64f240e1a"
},
"indexingEmbedder": {
"source": "rest",
"url": "https://URL.endpoints.huggingface.cloud",
"apiKey": "hf_XXXXXXX",
"documentTemplate": "Your {{doc.template}}",
"request": {
"inputs": [
"{{text}}",
"{{..}}"
]
},
"response": [
"{{embedding}}",
"{{..}}"
]
}
}
}
}
- 创建复合嵌入器后,Meilisearch将在索引时使用
indexingEmbedder,查询时使用searchEmbedder
详细文档请参阅使用说明页面。
由 @dureuill 在 #5371 和 #5401 中实现。
通过ID批量获取文档
现支持通过ID批量获取文档:
curl -H 'Content-Type: application/json' MEILISEARCH_URL/indexes/INDEX_UID/documents -d '{ "ids": ["cody", "finn", "brandy", "gambit"] }'
{
"results": [
{
"id": "brandy",
"info": 13765493
},
{
"id": "finn",
"info": 35863
},
{
"id": "cody",
"info": 122263
},
{
"id": "gambit",
"info": 22222
}
],
"offset": 0,
"limit": 20,
"total": 4
}
[!WARNING] 文档返回顺序与查询顺序不同,不存在的文档将被忽略。
由 @dureuill 在 #5384 中实现。
其他改进
- 通过PUT或POST批量处理
/documents请求 - @Kerollmops 在 #5293 中实现 /batches路由显示带时间戳的内部索引步骤 - @Kerollmops 在 #5356 和 #5364 中实现- 为
/facet-search路由添加exhaustiveFacetCount参数实现完整分面计数 - @ManyTheFish 在 #5369 中实现 - 降低 arroy 内存消耗 - @irevoire 在 https://github.com/meilisearch/arroy/pull/105 中实现
- 实验性功能:搜索时缓存向量(详情)- @dureuill 在 #5418 中实现
- 批处理进度视图扩展至包含向量索引 - @irevoire 在 #5420 中实现
- 亚美尼亚字符不再区分大小写 - @ManyTheFish 在 https://github.com/meilisearch/meilisearch/pull/5454 中实现
- 当搜索属性顺序改变时避免重新索引 - @ManyTheFish 在 https://github.com/meilisearch/meilisearch/pull/5402 中实现
- 磁盘空间不足时仍接受取消任务 - @irevoire 在 https://github.com/meilisearch/meilisearch/pull/5492 中实现
修复
- 修复地理更新错误 - @ManyTheFish 在 https://github.com/meilisearch/meilisearch/pull/5407 中实现
- 修复
disabledOnAttributes设置中属性的前缀搜索问题 - @ManyTheFish 在 https://github.com/meilisearch/meilisearch/pull/5415 中实现(修复 #5347 和 #5452) - 修复CI与合并队列兼容性问题 - @Kerollmops 在 https://github.com/meilisearch/meilisearch/pull/5456 中实现
- 支持从模型配置获取池化方法 - @dureuill 在 #5355 中实现
- 删除未使用的前缀 - @Kerollmops 在 #5413 中实现
- 修复迷你仪表盘面板重复弹出问题 - @curquiza 在 https://github.com/meilisearch/meilisearch/pull/5436 中实现
- 启用
rankingScoreThreshold不再导致_rankingScore计算错误 - @barloes 和 @dureuill 在 https://github.com/meilisearch/meilisearch/pull/5313 中实现 - 接收含
_vectors字段的文档时验证向量维度 - @dureuill 在 https://github.com/meilisearch/meilisearch/pull/5478 中实现
其他事项
- 依赖更新
- 将CI的Ubuntu版本从20.04升级至22.04 - @Kerollmops 在 #5338 中实现
- 升级 heed 至 v0.22 - @irevoire 和 @Kerollmops 在 #5406 中实现
- 升级 ring 至 v0.17.14 以兼容旧版 aarch64 架构 - @Kerollmops 在 https://github.com/meilisearch/meilisearch/pull/5423 中实现
- 升级 zip 从2.2.2至2.3.0 - @dependabot 在 https://github.com/meilisearch/meilisearch/pull/5426 中实现
- CI与测试
- 提升 get_index.rs 测试性能 - @DerTimonius 在 #5210 中实现
- 新增 Ollama 集成测试 - @Kerollmops 在 #5308 中实现
- 确保新增字段时正确配置设置路由 - @MichaScant 在 #5149 中实现
- 在Windows上跳过快照测试 - @Kerollmops 在 #5383 中实现
- 修复CI与合并队列兼容性问题 - @Kerollmops 在 https://github.com/meilisearch/meilisearch/pull/5456 中实现
- 支持可读格式的批处理大小 - @Kerollmops 在 https://github.com/meilisearch/meilisearch/pull/5421 中实现
- 增加进度级别以衡量合并与后处理 - @Kerollmops 在 https://github.com/meilisearch/meilisearch/pull/5422 和 https://github.com/meilisearch/meilisearch/pull/5468 中实现
- 将词FST使用隔离至拼写纠错功能 - @ManyTheFish 在 https://github.com/meilisearch/meilisearch/pull/5415 中实现
- 显示各批处理数据库大小 - @Kerollmops 在 https://github.com/meilisearch/meilisearch/pull/1457 和 https://github.com/meilisearch/meilisearch/pull/5464 中实现
⚠️ 批处理统计信息可能随时变更
- 提升文档统计计算性能 - @Kerollmops 在 https://github.com/meilisearch/meilisearch/pull/5465 中实现
❤️ 再次感谢所有外部贡献者:
- Meilisearch:@MichaScant
- Heed:@oXtxNt9U
- Arroy:@ptondereau
- Charabia:@NarHakobyan, @mosuka
更新内容 (原始)
Meilisearch v1.14 gives more granular control over which parts of filters you can disable for indexing performance optimization. This release also includes composite embedders, which can improve embedding generation during search and indexing, and a new route to retrieve multiple documents by their IDs.
🧰 All official Meilisearch integrations (including SDKs, clients, and other tools) are compatible with this Meilisearch release. Integration deployment happens between 4 to 48 hours after a new version becomes available.
Some SDKs might not include all new features. Consult 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 🔥
Granular filterable attribute settings
v1.14 gives you more control over which types of filter you want to disable in your searches. This allows you to further optimize indexing speeds by letting you activate only the filter features you need.
Use PATCH /indexes/INDEX_NAME/settings to specify which filters you want to enable for each attribute in your documents:
{
"filterableAttributes": [
{
"attributePatterns": ["genre", "artist"],
"features": {
"facetSearch": true,
"filter": {
"equality": true,
"comparison": false
}
}
},
{
"attributePatterns": ["rank"],
"features": {
"facetSearch": false,
"filter": {
"equality": true,
"comparison": true
}
}
}
]
}
For more details about this feature, please refer to the dedicated documentation page.
Done by @ManyTheFish in #5254.
Composite embedders
This feature allows using different embedders at search and indexing time. This can be useful when optimizing AI-powered search performance. For example, you may prefer to use:
- A remote embedder during indexing, as remote embedders have higher bandwidth and can generate more embeddings per second
- A local embedder when answering to search queries, as local embedders have lower latency and can respond more quickly to user input
To use the feature, follow these steps:
- Enable the
Composite embeddersfeature with the Meilisearch Cloud interface, or with the/experimental-featuresroute:
curl MEILISEARCH_URL/experimental-features \
-H 'Content-Type: application/json' \
-d '{"compositeEmbedders": true}'
- Next, create an embedder, setting its
sourceto"composite"and defining onesearchEmbedderand oneindexingEmbedder:
{
"embedders": {
"text": {
"source": "composite",
"searchEmbedder": {
"source": "huggingFace",
"model": "baai/bge-base-en-v1.5",
"revision": "a5beb1e3e68b9ab74eb54cfd186867f64f240e1a"
},
"indexingEmbedder": {
"source": "rest",
"url": "https://URL.endpoints.huggingface.cloud",
"apiKey": "hf_XXXXXXX",
"documentTemplate": "Your {{doc.template}}",
"request": {
"inputs": [
"{{text}}",
"{{..}}"
]
},
"response": [
"{{embedding}}",
"{{..}}"
]
}
}
}
}
- Once the composite embedder has been created, Meilisearch will use its
indexingEmbedderduring indexing andsearchEmbedderwhen responding to user queries
For more details about this feature, please refer to its public usage page.
Done by @dureuill in #5371 and #5401.
Retrieve multiple documents by ID
It is now possible to retrieve multiple documents by their IDs:
curl -H 'Content-Type: application/json' MEILISEARCH_URL/indexes/INDEX_UID/documents -d '{ "ids": ["cody", "finn", "brandy", "gambit"] }'
{
"results": [
{
"id": "brandy",
"info": 13765493
},
{
"id": "finn",
"info": 35863
},
{
"id": "cody",
"info": 122263
},
{
"id": "gambit",
"info": 22222
}
],
"offset": 0,
"limit": 20,
"total": 4
}
[!WARNING] Documents are not returned in the queried order. Non-existent documents are ignored.
Done by @dureuill in #5384.
Other improvements
- Batch together
/documentsrequests using eitherPUTorPOSTby @Kerollmops in #5293 - Display timestamped internal indexing steps on the
/batchesroute by @Kerollmops in #5356 and #5364 - Introduce
exhaustiveFacetCountparameter to/facet-searchroute to retrieve an exhaustive facet count by @ManyTheFish in #5369 - Reduce RAM consumption of arroy by @irevoire in https://github.com/meilisearch/arroy/pull/105
- Experimental feature: Cache embeddings during search (Read more in the feature discussion) by @dureuill in #5418
- Extend batch progress view to include indexing of vectors by @irevoire in #5420
- Armenian characters are no longer case-sensitive by @ManyTheFish in https://github.com/meilisearch/meilisearch/pull/5454
- Avoid reindexing searchables when the order changes by @ManyTheFish in https://github.com/meilisearch/meilisearch/pull/5402
- Accept cancellation tasks even when the disk is full by @irevoire in https://github.com/meilisearch/meilisearch/pull/5492
Fixes
- Geo update bug by @ManyTheFish in https://github.com/meilisearch/meilisearch/pull/5407
- Fix prefix search on attributes listed in
disabledOnAttributessettings by @ManyTheFish in https://github.com/meilisearch/meilisearch/pull/5415 (fixes #5347 and #5452) - Fix CI to work with merge queues by @Kerollmops in https://github.com/meilisearch/meilisearch/pull/5456
- Support fetching the pooling method from the model configuration by @dureuill in #5355
- Delete unused prefixes by @Kerollmops in #5413
- Fixes mini dashboard to prevent the panel from popping up every time by @curquiza in https://github.com/meilisearch/meilisearch/pull/5436
- Enabling
rankingScoreThresholdno longer causes_rankingScoreto be miscalculated by @barloes and @dureuill in https://github.com/meilisearch/meilisearch/pull/5313 - Validate dimensions of embedding when receiving documents with
_vectorsby @dureuill in https://github.com/meilisearch/meilisearch/pull/5478
Misc
- Dependencies updates
- Bump Ubuntu in the CI from 20.04 to 22.04 by @Kerollmops in #5338
- Bump heed to v0.22 by @irevoire and @Kerollmops in #5406
- Bump ring to v0.17.14 to compile on old aarch64 by @Kerollmops in https://github.com/meilisearch/meilisearch/pull/5423
- Bump zip from 2.2.2 to 2.3.0 by @dependabot in https://github.com/meilisearch/meilisearch/pull/5426
- CIs and tests
- Improve test performance of get_index.rs by @DerTimonius in #5210
- Ollama Integration Tests by @Kerollmops in #5308
- Ensure the settings routes are properly configured when a new field is added to the Settings struct by @MichaScant in #5149
- Skip a snapshot test on Windows by @Kerollmops in #5383
- Fix CI to work with merge queues by @Kerollmops in https://github.com/meilisearch/meilisearch/pull/5456
- Accept total batch size in human size by @Kerollmops in https://github.com/meilisearch/meilisearch/pull/5421
- Add more progress levels to measure merging and post-processing by @Kerollmops in https://github.com/meilisearch/meilisearch/pull/5422 and https://github.com/meilisearch/meilisearch/pull/5468
- Isolate word fst usage to dedicate it to typo-correction by @ManyTheFish in https://github.com/meilisearch/meilisearch/pull/5415
- Show database sizes batches by @Kerollmops in https://github.com/meilisearch/meilisearch/pull/5457 and https://github.com/meilisearch/meilisearch/pull/5464
⚠️ Please consider that the batches stats content can change anytime.
- Improve performance of computing document stats by @Kerollmops in https://github.com/meilisearch/meilisearch/pull/5465
❤️ Thanks again to our external contributors:
- Meilisearch: @MichaScant
- Heed: @oXtxNt9U
- Arroy: @ptondereau
- Charabia: @NarHakobyan, @mosuka