Articles on: Troubleshooting

No results are displayed when performing a search

If you find that no documents are present after adding them, it's probable that the document upload didn't succeed.

To understand the cause, please check the status of the document addition task in the Task View:


Task View

Alternatively, you can make an API request to check the task status. If the task failed, the response should contain an error object.

Below is an example of a failed task. Check the error message for more information.

{
  "indexUid": "products",
  "status": "failed",
  "type": "documentAdditionOrUpdate",
  "uid": 1,
  "details": {
    "receivedDocuments": 14,
    "indexedDocuments": 0
  },
  "canceledBy": null,
  "error": {
    "message": "The primary key inference failed as the engine found 2 fields ending with `id` in their names: 'id' and 'product_id'. Please specify the primary key manually using the `primaryKey` query parameter.",
    "code": "index_primary_key_multiple_candidates_found",
    "type": "invalid_request",
    "link": "https://docs.meilisearch.com/errors#index_primary_key_multiple_candidates_found"
  },
  "duration": "PT0.005953018S",
  "startedAt": "2023-10-20T11:48:23.027Z",
  "enqueuedAt": "2023-10-20T11:48:23.022Z",
  "finishedAt": "2023-10-20T11:48:23.033Z"
}


The most common scenario is that Meilisearch couldn't identify the primary key of your documents.

Updated on: 16/11/2023

Was this article helpful?

Share your feedback

Cancel

Thank you!