You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Docker+Laravel10+MeiliSearch1.7环境下multi-search路由404错误求助

解决MeiliSearch v1.7 multi-search 404问题

给你几个直接的排查方向,按顺序来:

  1. 检查MeiliSearch启动参数
    确认你的Docker容器启动时没加--disable-multi-search参数。如果用docker-compose部署,看配置里的command字段有没有这个选项,有的话删掉重启容器。MeiliSearch v1.x默认启用multi-search,除非手动禁用。

  2. 核对索引UID
    你单索引请求用的UID是d99f2662-5d20-4157-b45f-91fb810f1d7b-applications-index,但multi-search里写的是d99f2662-5d20-4156-b45e-92fb810f1d7b-applications-index,UUID部分有好几处差异,这大概率是手误写错了,先改成和单索引一致的UID试试。

  3. 修正请求格式
    你的multi-search请求数据开头多了个空格:' {"queries": [,虽然curl可能容错,但最好去掉多余空格避免解析问题。修正后的请求命令如下:

    curl --location 'http://localhost:7700/multi-search' \
    --header 'Content-Type: application/json' \
    --header 'Authorization: Bearer masterKey' \
    --data '{
        "queries": [
            {
              "indexUid": "d99f2662-5d20-4157-b45f-91fb810f1d7b-applications-index",
              "q": "0001"
            }
        ]
    }'
    
  4. 确认服务与索引状态
    先访问http://localhost:7700/health确认MeiliSearch服务正常运行,再访问http://localhost:7700/indexes查看所有索引列表,确保你要查询的索引确实存在。

MeiliSearch v1.7的multi-search不需要额外开启开关,默认就是可用的,重点排查上面几个点即可。

内容的提问来源于stack exchange,提问作者Cruze

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.24 22:27:29