meilisearch v1.26.0 版本更新介绍
发布日期: 2025-11-17
版本号: v1.26.0
本次更新主要新增了三项功能:首先,用户现在可以在文档添加或更新任务中附加自定义元数据,只需在相关路由后添加
customMetadata查询参数,该元数据会显示在任务状态或webhook中。其次,HuggingFace嵌入器新增了对modernBERT架构模型的支持,可在本地CPU或GPU上生成嵌入。此外,实验性功能允许用户配置忽略特定嵌入器错误(如文档模板渲染失败或请求失败),以及设置REST嵌入器的超时时间。其他更新包括移除了未使用的依赖,同时感谢了新贡献者。
更新内容 (中文)
✨ 增强功能
允许在文档添加或更新任务中附加自定义元数据
- 为更方便地跟踪哪些文档已由 Meilisearch 处理,现在可以在所有创建文档相关任务的路由中附加任意字符串。
- 使用此自定义元数据创建的任务,在通过任务路由访问或通过 webhook 发送时,将显示所传递的元数据。
- 要使用此功能,请在任何受支持的路由中添加
customMetadata查询参数:
POST /indexes/{indexUid}/documents?customMetadata=my-metadata-for-the-task
- 请注意,与常规查询参数一样,该参数的值必须经过 URL 编码。
- 受支持的路由列表:
POST /indexes/{indexUid}/documents
PUT /indexes/{indexUid}/documents
DELETE /indexes/{indexUid}/documents/{documentId}
POST /indexes/{indexUid}/documents/delete-batch
POST /indexes/{indexUid}/documents/delete
POST /indexes/{indexUid}/documents/edit
DELETE /indexes/{indexUid}/documents
- 带有元数据的任务通过
GET /tasks查询的示例输出:
{
"results": [
{
"uid": 37,
"batchUid": 37,
"indexUid": "mieli",
"status": "succeeded",
"type": "documentDeletion",
"canceledBy": null,
"details": {
"deletedDocuments": 31944
},
"error": null,
"duration": "PT0.511099S",
"enqueuedAt": "2025-11-06T16:33:37.816237Z",
"startedAt": "2025-11-06T16:33:37.821591Z",
"finishedAt": "2025-11-06T16:33:38.33269Z",
"customMetadata": "removeall"
},
{
"uid": 36,
"batchUid": 36,
"indexUid": "movies",
"status": "succeeded",
"type": "documentAdditionOrUpdate",
"canceledBy": null,
"details": {
"receivedDocuments": 31968,
"indexedDocuments": 31944
},
"error": null,
"duration": "PT3.192271S",
"enqueuedAt": "2025-10-30T10:31:12.896073Z",
"startedAt": "2025-10-30T10:31:12.911905Z",
"finishedAt": "2025-10-30T10:31:16.104176Z",
"customMetadata": "foo"
}
],
"total": 38,
"limit": 2,
"from": 36,
"next": 35
}
由 @dureuill 在 https://github.com/meilisearch/meilisearch/pull/5963 中贡献
huggingFace 嵌入器支持更多模型
现在,当使用 huggingFace 嵌入器在 CPU 或 GPU 上本地生成嵌入时,可以选择具有 modernBERT 架构的模型。
由 @hayatosc 在 https://github.com/meilisearch/meilisearch/pull/5980 中贡献
🧪 实验性功能:嵌入器故障模式
现在可以选择忽略某些与嵌入器相关的错误。具体可以是:
- 与文档模板渲染不当相关的错误
- 与向嵌入器发送嵌入请求失败相关的错误(这包括
userProvided嵌入器中缺失的向量) - 或同时忽略这两种错误。
当忽略错误时,相应的文档将不会有嵌入,但关联的任务批次不会被标记为失败。
当然,忽略错误意味着更难发现嵌入器的问题,因此请谨慎使用此功能。
要启用此功能:
- 云服务用户,请联系支持团队。
- 开源用户,请使用环境变量
MEILI_EXPERIMENTAL_CONFIG_EMBEDDER_FAILURE_MODES,并将其设置为要忽略的错误的逗号分隔列表,可选值如下:ignore_document_template_failures忽略文档模板故障ignore_embedder_failures忽略嵌入器故障
- 例如:
ignore_document_template_failures,ignore_embedder_failures将忽略这两种故障
由 @dureuill 在 https://github.com/meilisearch/meilisearch/pull/5984 中贡献
🧪 实验性功能:REST 嵌入器超时控制
现在可以控制 REST 嵌入器请求超时前的等待时长。
- 云服务用户,请联系支持团队。
- 开源用户,请使用环境变量
MEILI_EXPERIMENTAL_REST_EMBEDDER_TIMEOUT_SECONDS,其值必须为正整数。
由 @dureuill 在 https://github.com/meilisearch/meilisearch/pull/5984 中贡献
🔩 杂项
- 移除未使用的依赖项
allocator-api2,由 @xuhongxu96 在 https://github.com/meilisearch/meilisearch/pull/5969 中贡献
👥 贡献者
衷心感谢我们的新贡献者 @hayatosc 和 @xuhongxu96 ❤️
更新内容 (原始)
✨ Enhancements
Allow to attach custom metadata in the document addition or update tasks
- To make it easier to keep track of which documents were processed by Meilisearch, it is now possible to attach an arbitrary string to all routes that create document-related tasks.
- Tasks created with this custom metadata will display the passed metadata when accessed by the tasks route or sent in webhooks.
- To use this feature, add the
customMetadataquery parameter to any supported route:
POST /indexes/{indexUid}/documents?customMetadata=my-metadata-for-the-task
- Note that, as usual for query parameters, the value of the parameter must be URL-encoded.
- List of supported routes:
POST /indexes/{indexUid}/documents
PUT /indexes/{indexUid}/documents
DELETE /indexes/{indexUid}/documents/{documentId}
POST /indexes/{indexUid}/documents/delete-batch
POST /indexes/{indexUid}/documents/delete
POST /indexes/{indexUid}/documents/edit
DELETE /indexes/{indexUid}/documents
- Sample output of
GET /tasksfor tasks with metadata:
{
"results": [
{
"uid": 37,
"batchUid": 37,
"indexUid": "mieli",
"status": "succeeded",
"type": "documentDeletion",
"canceledBy": null,
"details": {
"deletedDocuments": 31944
},
"error": null,
"duration": "PT0.511099S",
"enqueuedAt": "2025-11-06T16:33:37.816237Z",
"startedAt": "2025-11-06T16:33:37.821591Z",
"finishedAt": "2025-11-06T16:33:38.33269Z",
"customMetadata": "removeall"
},
{
"uid": 36,
"batchUid": 36,
"indexUid": "movies",
"status": "succeeded",
"type": "documentAdditionOrUpdate",
"canceledBy": null,
"details": {
"receivedDocuments": 31968,
"indexedDocuments": 31944
},
"error": null,
"duration": "PT3.192271S",
"enqueuedAt": "2025-10-30T10:31:12.896073Z",
"startedAt": "2025-10-30T10:31:12.911905Z",
"finishedAt": "2025-10-30T10:31:16.104176Z",
"customMetadata": "foo"
}
],
"total": 38,
"limit": 2,
"from": 36,
"next": 35
}
by @dureuill in https://github.com/meilisearch/meilisearch/pull/5963
Support more models for huggingFace embedder
You can now select models with the modernBERT architecture when generating embeddings locally on CPU or GPU with the huggingFace embedder.
This unlocks for instance Ruri v3 and other models
by @hayatosc in https://github.com/meilisearch/meilisearch/pull/5980
🧪 Experimental: embedder failure modes
You can now decide to ignore some embedder-related errors. Either:
- Errors related to a document template not rendering properly
- Errors related to an embedding request to an embedder failing (this includes missing vectors in
userProvidedembedders) - Or both kinds of errors.
When errors are ignored, the corresponding documents will not have embeddings, but the associated batch of tasks will not be marked as failed.
Of course, ignoring errors means that it is harder to notice an issue with embedders, so use this feature parsimoniously.
To enable the feature:
- Customers of the Cloud, please ask the support.
- OSS users, please use the
MEILI_EXPERIMENTAL_CONFIG_EMBEDDER_FAILURE_MODESand set it to a comma-separated list of errors to ignore, with the possible values:ignore_document_template_failuresto ignore document template failuresignore_embedder_failuresto ignore embedder failures
- For example:
ignore_document_template_failures,ignore_embedder_failuresignores both kinds of failures
by @dureuill in https://github.com/meilisearch/meilisearch/pull/5984
🧪 Experimental: timeout control for REST embedders
You can now control the duration before a REST embedder request times out.
- Customers of the Cloud, please ask the support.
- OSS users, please use the
MEILI_EXPERIMENTAL_REST_EMBEDDER_TIMEOUT_SECONDS, which must be a positive integer.
by @dureuill in https://github.com/meilisearch/meilisearch/pull/5984
🔩 Misc
- Remove unused dependency
allocator-api2by @xuhongxu96 in https://github.com/meilisearch/meilisearch/pull/5969
👥 Contributors
Many thanks to our new contributors @hayatosc and @xuhongxu96 ❤️