meilisearch v1.51.0 版本更新介绍
发布日期: 2026-07-27
版本号: v1.51.0
本次更新为 Meilisearch 带来了多项功能增强与优化。主要新增了动态搜索规则(DSR)的
filter激活条件,允许基于特定分面值组合来启用规则,并引入了lastUpdatedAt字段以跟踪规则的最后更新时间,规则列表现默认按此时间降序排列。同时,为控制 DSR 引擎行为新增了四个相关环境变量。搜索请求速度显著提升,通过优化内部数据获取流程,在包含大量不同字段的数据集上实现了高达 5.4 倍的加速。此外,“无数据导出升级”功能已稳定,其启动参数重命名为—-upgrade-db,并移除了若干已过时的实验性功能。修复了旧版属性模式(特别是过滤属性简写语法)的兼容性问题,并完善了多搜索日志,同步更新了相关文档与依赖组件。
更新内容 (中文)
✨ 增强功能
-
为 DSR 添加过滤条件 由 @dureuill 在 https://github.com/meilisearch/meilisearch/pull/6505 中提出
新的
filter规则激活条件动态搜索规则现在可以声明一个新的
filter条件:它包含一个values键,其值是一个 JSON 对象。 这个valuesJSON 对象的键是分面名称(例如color、genres等),而它们的值是过滤器必须为这些分面解析到的值,以便该规则被激活。发送带有 filter 条件的 DSR 的示例
// PATCH /dynamic-search-rules/test-filter { "conditions": { "filter": { "values": { "color": "red", "category": "shirt" } } }, "actions": [ { "selector": { "id": "red shirt on sales" }, "action": { "type": "pin", "position": 0 } } ] }启用上述 DSR 的搜索查询示例
{ "filter": "(category = shirt AND color = red) OR (category = jeans AND color = blue)" }请注意,过滤器只需要有一个分支解析到规则中声明的所有分面值,规则就会被激活。
新的
lastUpdatedAt字段通过
GET /dynamic-search-rules/{:ruleUid}和POST /dynamic-search-rules返回的动态搜索规则现在包含一个额外的lastUpdatedAt字段。 此字段会自动更新为最后修改该规则的任务的enqueuedAt值。规则按最近更新顺序列出
POST /dynamic-search-rules现在按lastUpdatedAt降序列出规则,这意味着最近更新的规则会首先列出。新的环境变量
定义了新的环境变量来控制 DSR 引擎的行为:
MEILI_EXPERIMENTAL_DSR_FUEL_FILTER_FUEL(范围 0..4294967296):控制 Meilisearch 在搜索时尝试解析多少个过滤器约束组合后会放弃并应用部分规则。MEILI_EXPERIMENTAL_DSR_FUEL_FILTER_OR_FUEL(范围 0..65536):控制 Meilisearch 在将过滤器转换为规范形式时构建多少个过滤器析取。MEILI_EXPERIMENTAL_DSR_FUEL_FILTER_AND_FUEL(范围 0..65536):控制 Meilisearch 在将过滤器转换为规范形式时总共构建多少个过滤器合取。MEILI_EXPERIMENTAL_DSR_FUEL_FILTER_DEPTH_FUEL(范围 0..256):控制 Meilisearch 在将过滤器转换为规范形式时允许的最大递归深度。
-
加速搜索请求 由 @Kerollmops 在 https://github.com/meilisearch/meilisearch/pull/6528 中提出 通过避免不必要的内部工作来提高 Meilisearch 的搜索速度。我们将整个搜索管道中从磁盘检索数据的次数大幅减少到仅一次。此改进对文档中具有大量不同字段的数据集影响最大。我们在一个拥有超过 14k 个不同字段的数据集上,看到了高达 5.4 倍的搜索速度提升。
-
稳定无转储升级 由 @curquiza 在 https://github.com/meilisearch/meilisearch/pull/6486 中提出 ⚠️ 随着实验性功能的稳定,这是一个破坏性变更 ⚠️ 标志
—-experimental-dumpless-upgrade已重命名为—-upgrade-db,行为完全相同。 -
移除未使用的实验性功能 由 @curquiza 在 https://github.com/meilisearch/meilisearch/pull/6489 中提出 ⚠️ 破坏性变更:移除以下实验性功能 ⚠️
- 复制参数:移除
--experimental-replication-parameters,因为它已过时。我们现在有其他处理复制的方法。 - 使用旧文档索引器回退导入转储:移除
--experimental-no-edition-2024-for-dumps。此标志旨在防止与我们新索引器相关的错误,该索引器现已稳定。 - 不压缩快照:移除
--experimental-no-snapshot-compaction,因为它已不再有用。
- 复制参数:移除
🪲 错误修复
- 确保旧版属性模式正常工作 由 @Kerollmops 在 https://github.com/meilisearch/meilisearch/pull/6531 中提出
- 修复了简写可过滤属性语法缺少支持的问题
🔩 杂项
- 在多搜索中添加缺失的日志 由 @ManyTheFish 在 https://github.com/meilisearch/meilisearch/pull/6529 中提出
- 文档:修复过时的 v1.0 之前支持版本声明 由 @vishnujayvel 在 https://github.com/meilisearch/meilisearch/pull/6524 中提出
- 将 sigstore/cosign-installer 从 4.1.1 升级到 4.1.2 由 @dependabot[bot] 在 https://github.com/meilisearch/meilisearch/pull/6427 中提出
- 将 actions/github-script 从 7 升级到 9 由 @dependabot[bot] 在 https://github.com/meilisearch/meilisearch/pull/6425 中提出
- 将 actions/upload-artifact 从 4 升级到 7 由 @dependabot[bot] 在 https://github.com/meilisearch/meilisearch/pull/6428 中提出
新贡献者
- @vishnujayvel 在 https://github.com/meilisearch/meilisearch/pull/6524 中做出了他们的首次贡献
更新内容 (原始)
✨ Enhancement
-
Add filter condition to DSRs by @dureuill in https://github.com/meilisearch/meilisearch/pull/6505
New
filterrule activation conditionDynamic search rules (DSR) can now declare a new
filtercondition: it contains a singlevalueskey, whose value is a JSON object. The keys of thisvaluesJSON object are the facet names (e.g.,color,genres, …), while their values are the values that a filter must resolve to for these facets, so that the rule is active.Example of sending a DSR with a filter condition
// PATCH /dynamic-search-rules/test-filter { "conditions": { "filter": { "values": { "color": "red", "category": "shirt" } } }, "actions": [ { "selector": { "id": "red shirt on sales" }, "action": { "type": "pin", "position": 0 } } ] }Example of search query that enables the DSR above
{ "filter": "(category = shirt AND color = red) OR (category = jeans AND color = blue)" }Note that the filter only needs to have one branch resolving to all the facet values declared in the rule for the rule to be active.
New
lastUpdatedAtfieldDynamic search rules returned by
GET /dynamic-search-rules/{:ruleUid}andPOST /dynamic-search-rulescontain an additionallastUpdatedAtfield.This field is automatically updated with the
enqueuedAtvalue of the last task that modified the rule.Rules are listed with the most recently updated first
POST /dynamic-search-rulesnow lists rules in descendinglastUpdatedAtorder, meaning that the most recently updated rules will be listed first.New environment variables
New environment variables are defined to control the behavior of the DSR fuel:
MEILI_EXPERIMENTAL_DSR_FUEL_FILTER_FUEL(in range 0..4294967296): controls how many filter constraint combinations Meilisearch will attempt to resolve at search time before giving up and applying partial rules.MEILI_EXPERIMENTAL_DSR_FUEL_FILTER_OR_FUEL(in range 0..65536): controls how many filter disjunctions Meilisearch will build when turning a filter to its canonical shapeMEILI_EXPERIMENTAL_DSR_FUEL_FILTER_AND_FUEL(in range 0..65536): controls how many filter conjunctions Meilisearch will build in total when turning a filter to its canonical shapeMEILI_EXPERIMENTAL_DSR_FUEL_FILTER_DEPTH_FUEL(in range 0..256): controls the maximum recursive depth that Meilisearch allows when turning a filter to its canonical shape
-
Speed up search requests by @Kerollmops in https://github.com/meilisearch/meilisearch/pull/6528 Improves Meilisearch search speed by avoiding unnecessary internal work. We drastically reduced the number of times we retrieve data from disk to a single time across the whole search pipeline. This improvement will have the greatest effect on datasets with a large number of distinct fields across documents. We have seen search speeds up to 5.4x on a dataset with more than 14k different fields.
-
Stabilize dumpless upgrade by @curquiza in https://github.com/meilisearch/meilisearch/pull/6486
⚠️ Breaking change following the stabilization of an experimental feature ⚠️
The flag
—-experimental-dumpless-upgradeis renamed—-upgrade-db, keeping the exact same behavior. -
Remove unused experimental features by @curquiza in https://github.com/meilisearch/meilisearch/pull/6489
⚠️ Breaking change: removing the following experimental features ⚠️
- Replication parameters: removing
--experimental-replication-parametersbecause outdated. We now have another way to handle replication. - Import dumps with old document indexer fallback: removing
--experimental-no-edition-2024-for-dumps. This flag existed to prevent bugs related to our new indexer, which is now stable. - No snapshot compression: removing
--experimental-no-snapshot-compactionbecause it’s not useful anymore.
- Replication parameters: removing
🪲 Bug fixes
- Make sure legacy attribute patterns work by @Kerollmops in https://github.com/meilisearch/meilisearch/pull/6531
- Missing support for the shorthand filterable attributes syntax
🔩 Miscellaneous
- Add missing logs in multisearch by @ManyTheFish in https://github.com/meilisearch/meilisearch/pull/6529
- Docs: Fix stale pre-v1.0 supported versions statement by @vishnujayvel in https://github.com/meilisearch/meilisearch/pull/6524
- Bump sigstore/cosign-installer from 4.1.1 to 4.1.2 by @dependabot[bot] in https://github.com/meilisearch/meilisearch/pull/6427
- Bump actions/github-script from 7 to 9 by @dependabot[bot] in https://github.com/meilisearch/meilisearch/pull/6425
- Bump actions/upload-artifact from 4 to 7 by @dependabot[bot] in https://github.com/meilisearch/meilisearch/pull/6428
New Contributors
- @vishnujayvel made their first contribution in https://github.com/meilisearch/meilisearch/pull/6524
下载链接
- meilisearch-enterprise-linux-aarch64
- meilisearch-enterprise-linux-amd64
- meilisearch-enterprise-linux-riscv64
- meilisearch-enterprise-macos-amd64
- meilisearch-enterprise-macos-apple-silicon
- meilisearch-enterprise-windows-amd64.exe
- meilisearch-linux-aarch64
- meilisearch-linux-amd64
- meilisearch-linux-riscv64
- meilisearch-macos-amd64
- meilisearch-macos-apple-silicon
- meilisearch-openapi.json
- meilisearch-windows-amd64.exe
- meilisearch.deb