Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

junedc's avatar

MeiliSearch multi-search route throwing 404 error

On PostMan, creating a post request using index search somehow works

curl --location 'http://localhost:7700//indexes/e99f2662-5d20-4157-b45e-71fb810f1d7b-applications-index/search' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer masterKey' \
--data '{
    "q": "FR",
    "limit": 20
}'

however, using multi-search route, system throws 404 error which is kind of odd because the url is the same and multi-search is exposed by MeiliSearch. anybody manage to experience and fix this error? thanks for the help.

curl --location 'http://localhost:7700/multi-search' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer masterKey' \
--data ' {"queries": [
        {
          "indexUid": "e99f2662-5d20-4157-b45e-71fb810f1d7b-applications-index",
          "q": "0001"
        }
    ]
 }'
0 likes
3 replies
enoch91's avatar

@junedc you're sending a request to http://localhost:7700/multi-search, but the correct endpoint should include the indexUID like this http://localhost:7700/indexes/{indexUid}/multi-search.

LaryAI's avatar
Level 58

It seems like you're encountering a 404 error when trying to use the multi-search feature of MeiliSearch. This could be due to a few reasons, such as an incorrect URL or the feature not being enabled or supported in your version of MeiliSearch. Here are a few steps to troubleshoot and resolve the issue:

  1. Check MeiliSearch Version: Ensure that your MeiliSearch server is running a version that supports the multi-search feature. Multi-search was introduced in MeiliSearch v0.21.0. You can check your version by accessing the /version endpoint.

  2. URL Correction: Double-check the URL used for the multi-search request. It should be /indexes/:indexUid/search for single index searches and /multi-search for multi-index searches. Make sure there are no typos like double slashes or incorrect port numbers.

  3. Configuration: Ensure that your MeiliSearch instance is configured to accept requests from the client you're using (e.g., Postman). This includes checking firewall settings, API keys, and other security settings.

  4. API Key Permissions: If you are using an API key (as seen with Bearer masterKey), ensure that it has the necessary permissions to perform searches across multiple indexes.

  5. Request Format: Verify that the JSON payload in your request is correctly formatted. For multi-search, the structure should be as follows:

{
  "queries": [
    {
      "indexUid": "your-index-uid",
      "q": "your-query",
      "limit": 20
    }
  ]
}
  1. Server Logs: Check the server logs for any additional information about why the request might be failing. This can provide clues, especially if there's a configuration issue.

Here's a corrected example of a multi-search request using curl:

curl --location 'http://localhost:7700/multi-search' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer masterKey' \
--data '{
    "queries": [
        {
            "indexUid": "e99f2662-5d20-4157-b45e-71fb810f1d7b-applications-index",
            "q": "0001",
            "limit": 20
        }
    ]
}'

Make sure that the indexUid and other parameters are correctly specified and that your MeiliSearch instance is properly configured to handle multi-search requests. If the problem persists, consider reaching out to the MeiliSearch community or checking their GitHub issues for similar problems.

Please or to participate in this conversation.