Meilisearch icon

Meilisearch

Consume Meilisearch API

Documents → Get One Document

AI-generated

Overview

This node operation retrieves a single document from a specified index in Meilisearch. It is useful when you need to fetch detailed information about a specific document by its unique document ID within a given index. For example, you might use this to get user profile data, product details, or any indexed record stored in Meilisearch.

Use Case Examples

  1. Fetch a user profile document by its ID from the 'users' index.
  2. Retrieve a product document from the 'products' index using its document ID.

Properties

Name Meaning
Index UID The unique identifier (name) of the index from which to retrieve the document.
Document ID The unique identifier of the document to retrieve from the specified index.
Fields Comma-separated list of fields to include in the response. Defaults to all fields ('*').

Output

JSON

  • json - The JSON response containing the document data retrieved from the specified index.

Dependencies

  • Requires Meilisearch API credentials with access to the specified index.

Troubleshooting

  • Ensure the 'Index UID' is correctly selected and exists in your Meilisearch instance.
  • Verify the 'Document ID' is correct and the document exists in the specified index.
  • If specifying 'Fields', ensure the field names are valid and comma-separated without spaces.
  • Common errors include 404 Not Found if the document or index does not exist, or authentication errors if API credentials are invalid.

Links

Discussion