发布日期: 2025-08-26
版本号: v1.19.1

此前在Meilisearch中同时使用混合搜索与过滤器时,可能显著延长搜索时间。现在,当过滤条件返回的结果较少时,系统将直接计算语义距离,而非在向量数据库中全面搜索匹配的嵌入向量,从而提升了查询效率。

更新内容 (中文)

🐛 性能改进

通过筛选性能增强混合搜索

在Meilisearch的早期版本中,如以下示例将混合搜索与筛选条件混合使用,可能会使搜索时间增加数百倍。

{
  "q": "hello world",
  "limit": 100,
  "filter": "tag=science"
  "hybrid": {
    "semanticRatio": 0.5,
    "embedder": "default"
  }
}

现在,如果筛选条件只产生少量候选结果,Meilisearch将直接计算这些筛选后候选结果的语义距离,而不再于向量数据库中搜索最符合筛选条件的向量嵌入。

更新内容 (原始)

🐛 Performance improvements

Enhance hybrid search with filter performances

In previous versions of Meilisearch, mixing hybrid search with filters, as shown below, could multiply the search time by hundreds.

{
  "q": "hello world",
  "limit": 100,
  "filter": "tag=science"
  "hybrid": {
    "semanticRatio": 0.5,
    "embedder": "default"
  }
}

Meilisearch will now directly compute the semantic distance with the filtered candidates if only a few candidates come from the filter, instead of searching for the closest embeddings matching the filter in the vector database.

下载链接