Meilisearch icon

Meilisearch

Consume Meilisearch API

Documents → Delete One Document

AI-generated

Overview

This node operation deletes a single document from a specified index in Meilisearch. It is useful when you need to remove a specific document by its unique ID from a search index. For example, if a document is outdated or no longer relevant, this operation can be used to delete it from the index to keep the search results accurate and up-to-date.

Use Case Examples

  1. Deleting a user profile document from a 'users' index when the user account is deleted.
  2. Removing a product document from an e-commerce index when the product is discontinued.

Properties

Name Meaning
Index UID The unique identifier (name) of the index from which the document will be deleted.
Document ID The unique identifier of the document to be deleted from the specified index.
Wait for Completion Whether to wait for the deletion task to complete before returning. If enabled, the node will poll the task status until it succeeds, fails, or is canceled.
Use Exponential Backoff If waiting for completion, whether to use an exponential backoff strategy for polling the task status to reduce API calls.
Polling Interval (ms) The fixed interval in milliseconds between polling requests when exponential backoff is disabled.
Initial Polling Interval (ms) The starting interval in milliseconds between polling requests when exponential backoff is enabled. The interval increases by 1.5x every 5 attempts.
Max Polling Interval (ms) The maximum interval in milliseconds between polling requests when exponential backoff is enabled. The interval will not exceed this value.
Timeout (seconds) The maximum time in seconds to wait for the task completion when waiting for completion is enabled. Default is 300 seconds (5 minutes).

Output

JSON

  • taskUid - The unique identifier of the deletion task in Meilisearch.
  • status - The status of the deletion task (e.g., succeeded, failed, canceled).
  • type - The type of the task performed (deletion of a document).
  • details - Additional details about the task execution.
  • duration - The duration the task took to complete.
  • enqueuedAt - Timestamp when the task was enqueued.
  • startedAt - Timestamp when the task started.
  • finishedAt - Timestamp when the task finished.

Dependencies

  • An API key credential for Meilisearch API authentication

Troubleshooting

  • Ensure the Index UID and Document ID are correct and exist in Meilisearch to avoid 'document not found' errors.
  • If waiting for completion, the task may time out if the timeout value is too low; increase the timeout setting if necessary.
  • Check API credentials and host URL configuration if authentication errors occur.
  • If the task status returns 'failed' or 'canceled', review the Meilisearch server logs or API response for more details.

Discussion