发布日期: 2025-08-04
版本号: v1.16.0

Meilisearch v1.16 引入了两项重要功能:多模态嵌入和新的 /export 路由。多模态嵌入功能利用 AI 技术,使得索引可以同时处理图像和文本文档,并支持使用图像进行搜索查询。新的 /export 路由简化了从本地 Meilisearch 实例向 Meilisearch Cloud 迁移数据的过程,无需创建转储或快照。所有官方的 Meilisearch 集成工具均已兼容此版本。此次更新还包含多项性能改进和错误修复,例如提升了拼写容错性能、修复了混合搜索中的去重属性功能、解决了西里尔字母拼写容错的计算错误,并更新了迷你仪表板等。

更新内容 (中文)

Meilisearch v1.16 引入了两个主要功能:多模态嵌入和新的 /export 路由。多模态嵌入利用 AI 驱动的搜索,除了文本文档外,还能索引图像。/export 路由简化了从本地 Meilisearch 实例迁移到 Meilisearch Cloud 的过程。

🧰 所有官方 Meilisearch 集成(包括 SDK、客户端和其他工具)都与此版本的 Meilisearch 兼容。集成部署发生在新版本可用后的 4 到 48 小时内。

某些 SDK 可能未包含所有新功能。请查阅项目仓库获取详细信息。您选择的 SDK 中缺少您需要的功能?创建一个 issue 让我们知道您需要它,或者,为了获得开源声誉分,提交一个实现该功能的 PR(我们会因此爱上您的 ❤️)。

新功能与更新 🔥

实验性功能:多模态嵌入

v1.16 允许索引和搜索非文本文档,以及使用图像查询执行搜索。这个新功能使用多模态嵌入器为图像、文本以及任何其他数据片段提供共同的语义表示。

用法

首先,启用 multimodal 实验性功能:

curl \
  -X PATCH 'MEILISEARCH_URL/experimental-features/' \
  -H 'Content-Type: application/json'  \
  --data-binary '{
    "multimodal": true
  }'

接下来,选择一个支持多模态嵌入的嵌入器提供商,例如 CohereVoyageAI,开始构建嵌入配置。

以下是使用 VoyageAI 的多模态嵌入器配置示例:

curl \
  -X PATCH 'MEILISEARCH_URL/indexes/INDEX_NAME/settings/embedders' \
  -H 'Content-Type: application/json' \
  --data-binary '{
    "voyage": {
      "source": "rest",
      "url": "https://api.voyageai.com/v1/multimodalembeddings",
      "apiKey": "VOYAGE_API_KEY",
      "indexingFragments": {
        "text": {
          "value": {
            "content": [
              {
                "type": "text",
                "text": "A movie titled {{doc.title}} whose description starts with {{doc.overview|truncateWords:20}}."
              }
            ]
          }
        },
        "poster": {
          "value": {
            "content": [
              {
                "type": "image_url",
                "image_url": "{{doc.poster}}"
              }
            ]
          }
        }
      },
      "searchFragments": {
        "poster": {
          "value": {
            "content": [
              {
                "type": "image_url",
                "image_url": "{{media.poster}}"
              }
            ]
          }
        },
        "image": {
          "value": {
            "content": [
              {
                "type": "image_base64",
                "image_base64": "data:{{media.image.mime}};base64,{{media.image.data}}"
              }
            ]
          }
        },
        "text": {
          "value": {
            "content": [
              {
                "type": "text",
                "text": "{{q}}"
              }
            ]
          }
        }
      },
      "request": {
        "inputs": [
          "{{fragment}}",
          "{{..}}"
        ],
        "model": "voyage-multimodal-3"
      },
      "response": {
        "data": [
          {
            "embedding": "{{embedding}}"
          },
          "{{..}}"
        ]
      }
    }}

以上配置为 Meilisearch 设置生成两个字段的向量:textposter。它还允许用户使用图像 URL、原始图像或普通文本执行搜索。

使用新的 media 搜索参数以及您在嵌入器中指定的 searchFragments 之一来执行图像搜索:

curl -X POST 'MEILISEARCH_URL/indexes/INDEX_NAME/search' \
  -H 'content-type: application/json' \
  --data-binary '{
    "media": {
      "poster": "https://image.tmdb.org/t/p/w500/pgqj7QoBPWFLLKtLEpPmFYFRMgB.jpg"
    },
    "hybrid": {
      "embedder": "EMBEDDER_NAME"
    }
  }'

您也可以使用 qhybrid 执行文本搜索:

curl -X POST 'MEILISEARCH_URL/indexes/INDEX_NAME/search' \
  -H 'content-type: application/json' \
  --data-binary '{
    "q": "A movie with lightsabers in space",
    "hybrid": {
      "embedder": "voyage",
      "semanticRatio": 0.5
    }
  }'

当 Meilisearch 解析针对配置了多模态嵌入器索引的 hybrid 查询时,会对所有具有嵌入的字段执行搜索。

有关此功能的更多信息,请参阅其公开使用页面

由 @dureuill 在 #5596 中完成

新的 /export 路由

v1.16 引入了一个新的 /export 路由,允许在实例之间传输文档,而无需创建转储或快照。此功能在从本地机器迁移到 Meilisearch Cloud 时特别有用。

用法

要在实例之间传输数据,请查询 /export 并将其 url 参数指向目标实例的 URL:

curl \
  -X POST 'MEILISEARCH_URL/export' \
  -H 'Content-Type: application/json' \
  --data-binary '{
    "url": "http://localhost:7711"
  }'

这将生成一个导出并启动任务,在实例之间迁移数据。根据目标实例的不同,您可能还需要在 apiKey 参数中提供具有完全管理员权限的 API 密钥。请查阅文档以获取可接受参数的完整列表。

如果请求失败,Meilisearch 会在将其状态设置为失败之前重试几次。您也可以手动取消导出任务。在这种情况下,Meilisearch 将在本地中断任务,但不会在目标实例中断。

由 @kerollmops 在 @mubelotix 的帮助下在 #5670 中完成

其他改进

修复 🐞

杂项

❤️ 再次感谢我们的外部贡献者:

  • Meilisearch:@martin-g、@lblack00、@mcmah309、@nnethercott、@arthurgousset、@Mubelotix、@diksipav、@Nymuxyzo、@kametsun
  • Arroy:@nnethercott

更新内容 (原始)

Meilisearch v1.16 introduces two main features: multimodal embeddings and a new /export route. Multimodal embeddings use AI-powered search to index images in addition to textual documents. The /export route simplifies migrating from a local Meilisearch instance to Meilisearch Cloud.

🧰 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 🔥

Experimental feature: Multimodal embeddings

v1.16 allows indexing and searching non-textual documents, as well as performing searches with image queries. This new feature uses multimodal embedders to provide a common semantic representation for images, texts, and any other piece of data.

Usage

First, enable the multimodal experimental feature:

curl \
  -X PATCH 'MEILISEARCH_URL/experimental-features/' \
  -H 'Content-Type: application/json'  \
  --data-binary '{
    "multimodal": true
  }'

Next, pick an embedder provider that supports multimodal embeddings such as Cohere or VoyageAI to start building the embedding configuration.

The following is an example configuration for multimodal embedder using VoyageAI:

curl \
  -X PATCH 'MEILISEARCH_URL/indexes/INDEX_NAME/settings/embedders' \
  -H 'Content-Type: application/json' \
  --data-binary '{
    "voyage": {
      "source": "rest",
      "url": "https://api.voyageai.com/v1/multimodalembeddings",
      "apiKey": "VOYAGE_API_KEY",
      "indexingFragments": {
        "text": {
          "value": {
            "content": [
              {
                "type": "text",
                "text": "A movie titled {{doc.title}} whose description starts with {{doc.overview|truncateWords:20}}."
              }
            ]
          }
        },
        "poster": {
          "value": {
            "content": [
              {
                "type": "image_url",
                "image_url": "{{doc.poster}}"
              }
            ]
          }
        }
      },
      "searchFragments": {
        "poster": {
          "value": {
            "content": [
              {
                "type": "image_url",
                "image_url": "{{media.poster}}"
              }
            ]
          }
        },
        "image": {
          "value": {
            "content": [
              {
                "type": "image_base64",
                "image_base64": "data:{{media.image.mime}};base64,{{media.image.data}}"
              }
            ]
          }
        },
        "text": {
          "value": {
            "content": [
              {
                "type": "text",
                "text": "{{q}}"
              }
            ]
          }
        }
      },
      "request": {
        "inputs": [
          "{{fragment}}",
          "{{..}}"
        ],
        "model": "voyage-multimodal-3"
      },
      "response": {
        "data": [
          {
            "embedding": "{{embedding}}"
          },
          "{{..}}"
        ]
      }
    }}

The configuration above sets up Meilisearch to generate vectors for two fields: text and poster. It also allows users to perform searches with an image URL, a raw image, or regular text.

Use the new media search parameter together with one of the searchFragments you specified in your embedder to search with an image:

curl -X POST 'MEILISEARCH_URL/indexes/INDEX_NAME/search' \
  -H 'content-type: application/json' \
  --data-binary '{
    "media": {
      "poster": "https://image.tmdb.org/t/p/w500/pgqj7QoBPWFLLKtLEpPmFYFRMgB.jpg"
    },
    "hybrid": {
      "embedder": "EMBEDDER_NAME"
    }
  }'

You can also perform a text search with q and hybrid:

curl -X POST 'MEILISEARCH_URL/indexes/INDEX_NAME/search' \
  -H 'content-type: application/json' \
  --data-binary '{
    "q": "A movie with lightsabers in space",
    "hybrid": {
      "embedder": "voyage",
      "semanticRatio": 0.5
    }
  }'

Meilisearch performs searches all fields with embeddings when parsing hybrid queries targeting indexes with multimodal embedders.

For more information about this feature, please refer to its public usage page

Done by @dureuill in #5596

The new /export route

v1.16 introduces a new /export route that allows transferring documents between instances without having to create a dump or a snapshot. This feature is particularly useful when migrating from a local machine to Meilisearch Cloud.

Usage

To transfer data between instances, query /export and point its url parameter to the URL of the target instance:

curl \
  -X POST 'MEILISEARCH_URL/export' \
  -H 'Content-Type: application/json' \
  --data-binary '{
    "url": "http://localhost:7711"
  }'

This will generate an export and task start migrating data between instances. Depending on the target instance, you may also have to supply an API key with full admin permissions in the apiKey parameter. Consult the documentation for an exhaustive list of accepted parameters.

If the request fails, Meilisearch will retry a few times before setting its status to failed. You may also cancel an export task manually. In this case, Meilisearch will interrupt the task locally, but not in the target instance.

Done by @kerollmops with the help of @mubelotix in #5670

Other improvements

Fixes 🐞

Misc

❤️ Thanks again to our external contributors:

  • Meilisearch: @martin-g, @lblack00, @mcmah309, @nnethercott, @arthurgousset, @Mubelotix, @diksipav, @Nymuxyzo, @kametsun
  • Arroy: @nnethercott

下载链接